Hi,
I want to read a mainframe GDG file name in SAS. Is there any specfic code or command to achive this task? I have read about JFCB option but this works only in Mainframe SAS but not in Windows SAS.
Can any one please help me on this...
Thanks,
Venu.
Hey, you actually found someone who knows what a GDG is!
What do you mean that you want to "read" the filename. I assume this is different from reading the file? Where are you trying to read it from?
Tom
Hi Tom,
I'm trying to read a mainframe file(Z/OS file) from SAS EG. GDG is nothing but genaration data groups where multiple versions of the files will be generated as shown below..
OPSDESK.PHONES.UNPAIRED
OPSDESK.PHONES.UNPAIRED.G0001V00
OPSDESK.PHONES.UNPAIRED.G0002V00
OPSDESK.PHONES.UNPAIRED.G0003V00
OPSDESK.PHONES.UNPAIRED.G0004V00
OPSDESK.PHONES.UNPAIRED.G0005V00
OPSDESK.PHONES.UNPAIRED.G0006V00
Requirement:-
Every day tehre is a new version available which I need to read. To make sure that the file i'm reading is not the same one which I have read yesterday I want to save the file name which I have read so that I can do a compre with the file names next time before its goes on with further execution.
Please let me know if my query is not clear
Does the FILENAME option on the INFILE statement help? Try something like this to test. If you are lucky you can use relative reference in the DD statement and SAS will display the absolute reference in the value of the FILENAME variable.
//MYFILE DD DSN=.....
....
data _null_;
length filename $200 ;
infile myfile filename=filename;
input;
put filename=;
stop;
run;
There's still something I'm missing. You're running SAS EG on your Windows PC, accessing a Generation Data Set, presumably sitting on a z/os mainframe.
1. What SAS server is your EG session using? What OS does it run?
2. How are you creating the link to your Generation Data Set? Do you use an INFILE statement in SAS code?
If it is code that you've created, could you post it?
Thanks,
Tom
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.