![]() Chapter Contents |
![]() Previous |
![]() Next |
| Moving and Accessing SAS Files across Operating Environments |
| Interpreting EBCDIC as ASCII Data |
CMS and OS/390 hosts store character data in EBCDIC format. Code That Interprets an EBCDIC File as ASCII shows SAS code that interprets the first portion of a transport file as ASCII data.
Code That Interprets an EBCDIC File as ASCII
//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 created the transport file.
ASCII Text Displayed by the XPORT Engine shows the first 40 characters in ASCII text of a transport file that the XPORT engine creates.
ASCII Text Displayed by the XPORT Engine
HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!00
ASCII Text Displayed by PROC CPORT shows the first 40 characters in ASCII text of a transport file that PROC CPORT creates.
ASCII Text Displayed by PROC CPORT
**COMPRESSED** **COMPRESSED** **COMPRESSED** **COM
Note:
If you set the NOCOMPRESS option to PROC CPORT, 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.
| Interpreting EBCDIC as Hexadecimal Data |
Code That Interprets an EBCDIC File as Hexadecimal
data _null_; infile 'transport-file'; input; list; put '-------------------'; if _n_ > 20 then step; run;
Hexadecimal Translation of Text Created by the XPORT Engine shows the hexadecimal text of the first 40 characters in a transport file that the XPORT engine creates:
Hexadecimal Translation of Text Created by the XPORT Engine
484541444552205245434F52442A2A2A2A2A2A2A 525920484541444552205245434F524421212121
This hexadecimal representation is equivalent to ASCII Text Displayed by the XPORT Engine.
Hexadecimal Translation of Text Created by PROC CPORT shows the hexadecimal text of the first 40 characters in a transport file that PROC CPORT creates.
Hexadecimal Translation of Text Created by PROC CPORT
2A2A434F4D505245535345442A2A202A2A434F4D 45442A2A202A2A434F4D505245535345442A2A20
This hexadecimal representation is equivalent to ASCII Text Displayed by PROC CPORT.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.