View previous topic :: View next topic
|
Author |
Message |
rsawla
New User
Joined: 06 Feb 2008 Posts: 1 Location: hyderabad
|
|
|
|
Hi Friends,
There is an existing cobol program which access the gdg files and print
totals in a report from those files.In the report i want to print the
GDG dataset name also.I think it can be done by invoking idcams but
not sure of the syntax.Please share the code and jcl for the same. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
IDCAMS can be invoked, but in order for IDCAMS to provide dataset info, you need to give it the dataset name. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
If you want to print the absolute generation when you know the relative generation I use the following type of JCL:
Code: |
//STEP10 EXEC PGM=IDCAMS
//DD1 DD DSN=HLQ.xxx.STEPxx.DSN(+1),DISP=SHR
//DD2 DD DSN=HLQ.xxx.STEPxx.DNS2(0),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1) COUNT(0) CHAR
PRINT INFILE(DD2) COUNT(0) CHAR
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If i understand the request, the question is how to get the dataset name into the running program. . . So that it can be used/printed within the program.
If i misunderstand, please clarify. |
|
Back to top |
|
|
amar_401
New User
Joined: 20 Sep 2006 Posts: 7
|
|
|
|
As the GDG Name will be standard use PARM to send the GDG name to the Cobol Program |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
As the GDG Name will be standard use PARM to send the GDG name to the Cobol Program |
An incomplete assumption at best. . .
The request is for the code to retrieve the dsn from the system - if we understand the request. . . Why assume the dsn would be standard? What if the same format data was in multiple gdg's that might be input?
It would be helpful if rsawla would provide the proper info. . . |
|
Back to top |
|
|
amar_401
New User
Joined: 20 Sep 2006 Posts: 7
|
|
|
|
Hey,
I am confused now with the requirement. Do u just want to print the GDG name used in the JCL as input or do you want to print the GDG name along with the version number.
If you want to print the GDG name then we can pass the GDG name through PARM because the GDG is already used in the JCL as Input so you know the name then what is the problem... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I am confused now with the requirement. |
As are others
As mentioned previously:
Quote: |
It would be helpful if rsawla would provide the proper info. . . |
Until some clarification is given, all we are doing is shooting in the dark. |
|
Back to top |
|
|
|