Reading Transport Files in zOS Operating Environments


Reading Transport Files in z/OS Operating Environments

Note  

The transport format uses ASCII encoding, which is foreign to z/OS operating environments. Because of this incompatibility , you cannot read transport files correctly in a text editor under the z/OS operating environment.

Interpreting Transport Files in SAS

The following SAS code enables you to read the first few lines of a transport file under the z/OS operating environment.

Note  

This program does not translate the file to EBCDIC. It only interprets the first five records in the file and writes them to the SAS log. The transport file remains unchanged.

Example Code 8.1: Code That Interprets the Header of the Transport File
start example
 //PEEK    JOB (,X101),'SMITH,B.',TIME=(,3) /*JOBPARM FETCH //STEP1   EXEC SAS //transport-  file  DD DSN=USERID.XPT6.FILE,DISP=SHR //SYSIN DD * data _null_;   infile tranfile obs=5;   input theline $ascii80.;   put theline; run; /* 
end example
 

Log output indicates whether the XPORT engine or PROC CPORT created the transport file.

Example Code 8.2 on page 53 shows the first 40 characters of the transport file that the XPORT engine creates.

Example Code 8.2: Transport Header for the XPORT Engine
start example
 HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!00 
end example
 

Example Code 8.3 on page 54 shows the first 40 characters of a transport file that PROC CPORT creates.

Example Code 8.3: Transport Header for the CPORT Procedure
start example
 **COMPRESSED** **COMPRESSED** **COMPRESSED** **COM 
end example
 
Note  

If you set the NOCOMPRESS option in the CPORT procedure, compression is suppressed, which prevents the display of the preceding text in a transport file.

For technical details about the transport format that is used for a data set, see Technical Support article TS-140, The Record Layout of a SAS Transport Data Set .

Reading Transport File as Hexadecimal Data

You can use ISPF to browse a transport file that has a hexadecimal format. Alternatively, you can use the following SAS code to display the first twenty 80-byte records of a transport file in hexadecimal format:

Example Code 8.4: Code That Reads a Transport File That Has a Hexadecimal Format
start example
 data _null_;   infile '  transport-file  ';   input; list; put '-------------------';   if _n_ > 20 then stop; run; 
end example
 

Example Code 8.5 on page 54 shows the hexadecimal representation of the first 40 ASCII characters in a transport file that the XPORT engine creates.

Example Code 8.5: Transport Header for the XPORT Engine: Hexadecimal Representation
start example
 484541444552205245434F52442A2A2A2A2A2A2A 4C5920484541444552205245434F524421212121 
end example
 

This hexadecimal representation is equivalent to Example Code 8.2 on page 53.

Example Code 8.6 on page 54 shows the hexadecimal representation of the first 40 ASCII characters in a transport file that PROC CPORT creates.

Example Code 8.6: Transport Header for the CPORT Procedure: Hexadecimal Representation
start example
 2A2A434F4D505245535345442A2A202A2A434F4D 50442A2A202A2A434F4D505245535345442A2A20 
end example
 

This hexadecimal representation is equivalent to Example Code 8.3 on page 54.




Moving and Accessing SAS 9.1 Files
Moving And Accessing SAS 9.1 Files
ISBN: 1590472306
EAN: 2147483647
Year: 2004
Pages: 109
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net