BookmarkSubscribeRSS Feed
Sarojkumar
Calcite | Level 5
I have a mainframe file as in the example below:
123-4567890-12;2009-07-26;2009-07-26;
123-0987654-32;2010-08-30;
234-5678901-23;2009-03-31;2009-12-29
345-6789012-34;2009-05-20;
456-7890123-45;2010-03-20;2009-09-15
567-8901234-56;2009-09-11;
.......
.......
I want to read it in DI Studio in UNIX but I am not getting the correct result. I am using the code as below. Can anyone help on this.

data A;

infile '"/"'
lrecl = 256
firstobs = 1
missover
RECFM = F;

attrib ID length = $14 informat = $ebcdic14.;
attrib DT1 length = $10 informat = $ebcdic10.;
attrib DT2 length = $10 informat = $ebcdic10.;

input @ 1 ID $ebcdic14.
@ 16 DT1 $ebcdic10.
@ 27 DT2 $ebcdic10.;

run;
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Can you be a bit more specific with the SAS processing behavior/result, than "...but I am not getting the correct result."?? What is SAS generating? And it would be best communicated if you were to capture the SAS-generated log and paste it directly into a post/reply, ideally with a PUTLOG _ALL_ in your code for diagnostic purposes (both your own and for the forum visitors).

Scott Barry
SBBWorks, Inc.
SASKiwi
PROC Star
There is also the question as to how you transferred your mainframe file to Unix. You should only use EBCDIC informats if the file was transferred in BINARY mode so that the file is still EBCDIC-encoded. If the file was transferred as TEXT then the translation to ASCII would have happened automatically so that you don't require the EBCIDC informats. If your input file just looks like standard text in a Unix text editor its already in ASCII.
mark1212
Calcite | Level 5

The reading of the mainframe file in the DI Studio in the Unix can be done by the given setups. The thing is that the user has to follow that to execute that. To implement that on the Windows platform the user has to access through windows modules installer worker high CPU

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1799 views
  • 0 likes
  • 4 in conversation