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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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