01-04-2013 01:49 PM
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...
01-04-2013 03:08 PM
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?
01-04-2013 03:48 PM
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..
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
01-04-2013 04:30 PM
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=.....
length filename $200 ;
infile myfile filename=filename;
01-04-2013 09:19 PM
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?