Date: Thu, 19 Mar 2009 08:49:52 -0400
Reply-To: Michael Raithel <michaelraithel@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Raithel <michaelraithel@WESTAT.COM>
Subject: Re: COBOL to sas layout error
Content-Type: text/plain; charset="us-ascii"
Amy posted the following:
> Hello, Can anyone help me with this:
> Insync browse shows the cobol layout as
> LVL FIELD NAME FORMAT POS
> 10 RHDR-ID C 20 23 00000000000012300
> 10 RRTSCR-SCRD-ID B 4 87 286
> so I code SAS as following.
> @23 ID $20.
> @87 RRTSCID IB4.
> The data in ID field was read in correctly, RRTSCID was
> wrong. I even tried RB4. still not work.
Amy, I see that your posting has caught the attention of one of the 'L's best and brightest--the Hashman; Paul D. While waiting for you to supply him with additional information, I thought I would chime in with this suggestion.
If you are going to be doing a lot of SAS programming work that is taking the place of existing COBOL programs, check out the COB2SAS program written by the brainiacs at the SAS Institute. In their own words:
"COB2SAS is a sample program provided by SAS Institute Inc. as a tool that can assist you in converting COBOL language data description entries into equivalent SAS language statements."
There are instructions for downloading and installing it here: http://support.sas.com/techsup/technote/ts536.html , and I note that it was just updated on 2/26/2009, so it appears to be pretty fresh.
Amy, best of luck getting COBOL-created files into your SAS programs!
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
Author: The Complete Guide to SAS Indexes
The end of the human race will be that it will eventually die of civilization. - Ralph Waldo Emerson