Desktop productivity for business analysts and programmers

Convert SAS file Layout to COBOL

Reply
Contributor
Posts: 34

Convert SAS file Layout to COBOL

Hi,

Sas provides layout from cobol to sas convertion (COB2SAS tool). However, i have a situation like, i have sas file layout, i would like to convert this sas layout to COBOL readable lay out. Does sas offer any tool to accomplish this task?

Thanks!
SAS Super FREQ
Posts: 8,720

Re: Convert SAS file Layout to COBOL

Hi:
I'm a little confused about your question. COB2SAS converts from a COBOL data description section into a SAS INPUT statement. Generally, you are doing this because you have a sequential or "flat file" that you were reading with COBOL and you want to transform that file into a SAS dataset by reading it with SAS.

Once you run the SAS program with the INPUT statement, the data (in SAS) are no longer in the sequential or flat layout described by the INPUT statement, they are stored in a SAS proprietary format.

So, when you say that you have a SAS layout -- do you mean you have an INPUT statement? And you want to convert that INPUT statement to a COBOL data description?

Or do you mean that you want to get a SAS proprietary format data file into some other form on some other platform?

In any case, there is no "SAS2COB" routine to translate a SAS INPUT statement into COBOL form. But, if you do have a flat file that needs to be read with COBOL, a good COBOL book should help you with this task. If you need to get a SAS data file into some other form, you can create a flt file using FILE/PUT statement in a DATA step program. You can use any of the SAS/Access products to write SAS data into some other form (or read some other form of data into SAS form).

For more help accessing data or writing data out, you can also contact SAS Tech Support.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 531 views
  • 0 likes
  • 2 in conversation