02-09-2015 03:29 AM
we need to import a TSO data file with packed fields. It is located on a host with OS390. We transfer it per ftp to the SAS server (with UNIX OS).
This is my current routine to import the files:
%let PFAD_BILANZWERTE = "/appdata/sas/fb_daten/vrm/lp/lf/inte/BIL_032015.bin";
@22 AENDDAT $EBCDIC10.
@32 AENDGRU $EBCDIC4.
@38 AENDBUCH_HHJJ $EBCDIC4.
@42 AENDBUCH_MM $EBCDIC2.
@48 MVANT S370FPD5.6
@89 BGKZ $EBCDIC3.
@230 DRZ S370FPD8.2
@238 DRP S370FPD8.2
@246 DRA S370FPD8.2
@931 VTID S370FPD3.;
I would like to optimize this routine. My preferred solution would be to supply the COBOL copy member of this file to SAS such that SAS knows where the fields start, end and which format they are on its own. Is this possible?
Has anyone experience with such files?
Thank you in advance!
02-09-2015 04:36 AM
You would need to write a data step that reads the COBOL definitions, and generates the input statement from that.
This data step could either write an external file that you later use with %include, or generate the data step to read the TSO file by using call execute.
Since you use FTP, you could also read the file directly from the z/OS mainframe with filename ftp. Saves the external FTP transfer and the disk space needed for the transferred file.
Need further help from the community? Please ask a new question.