Previous Page | Next Page

z/OS Operating Environment

Reading Transport Files in z/OS Operating Environments


z/OS Cannot Read ASCII Transport Files

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.


Example: Translating a Partial Transport File to EBCDIC

This 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.  [cautionend]

Code That Interprets the Header of the Transport File

//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;
/*

Log output indicates whether the XPORT engine or PROC CPORT was used to create the transport file.

This SAS code shows the first 40 characters of the transport file that the XPORT engine creates.

Transport Header for the XPORT Engine

HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!00

This SAS code shows the first 40 characters of a transport file that PROC CPORT creates.

Transport Header for the CPORT Procedure

**COMPRESSED** **COMPRESSED** **COMPRESSED** **COM

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.  [cautionend]

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.

Example: Reading a Partial Transport File in Hexadecimal Format

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

Code That Reads a Transport File That Has a Hexadecimal Format

data _null_;
  infile 'transport-file';
  input;
list;
put '-------------------';
  if _n_ > 20 then stop;
run;

This SAS code shows the hexadecimal representation of the first 40 ASCII characters in a transport file that the XPORT engine creates.

Transport Header for the XPORT Engine: Hexadecimal Representation

484541444552205245434F52442A2A2A2A2A2A2A
4C5920484541444552205245434F524421212121

This hexadecimal representation is equivalent to Transport Header for the XPORT Engine.

This SAS code shows the hexadecimal representation of the first 40 ASCII characters in a transport file that PROC CPORT creates.

Transport Header for the CPORT Procedure: Hexadecimal Representation

2A2A434F4D505245535345442A2A202A2A434F4D
50442A2A202A2A434F4D505245535345442A2A20

This hexadecimal representation is equivalent to Transport Header for the CPORT Procedure.

Previous Page | Next Page | Top of Page