Mainframe Systems Group

Creating SAS variable names from COBOL copy books

*** Remember, you can use Windows copying and pasting to copy this JCL from the browser to Roscoe or TSO.

Now that SAS release 8 can handle data names larger than 8 characters, there is a utility to create these data names from a COBOL copy book. The output is written to DDNAME OUTSAS (PDS or flat file).

This JCL is on the prod lpar in Roscoe member IC.COB2SAS

//STEP1  EXEC  PROC=SAS,OPTIONS='MACRO,DQUOTE'
//COB2SAS DD  DISP=SHR,DSN=SAS.COB2SAS
//INCOBOL DD  DISP=SHR,DSN=SYS1.COPYLIB(XXXXXX)
//OUTSAS  DD  DSN=***.***(XXXXXX),DISP=SHR		
//SYSIN   DD  *
  OPTIONS NONOTES NOSOURCE NOSOURCE2;
  %INCLUDE COB2SAS(R2MVS);
  RUN;
  PROC PRINT DATA=DICTNRY;
     BY FILENAME NOTSORTED;
     FORMAT RDF_NAME $8.;
     ID LEVEL;
     VAR NST_DPTH NEWNAME USAGE PICTURE INFMT ATBYTE
         BYTES OCR_VAL RDF_NAME;
  RUN;
/*
//

© 2008 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.