View previous topic :: View next topic
|
Author |
Message |
onesaggi
New User
Joined: 22 Dec 2010 Posts: 5 Location: Mumbai
|
|
|
|
Hi!
Is anybody aware of how to extract dataset name and write it into output file without using REXX.
I have requirement as mentioned below:
INDD DD DSN=T.EXTRACT.UPDATE,DISP=SHR
OUTDD DD DSN=T.BACKUP,DISP=(MOD,CATLG,CATLG)
Now, I want to write T.EXTRACT.UPDATE in T.BACKUP output dataset.
Thus, my output dataset will look like
12345 XYZ T.EXTRACT.UPDATE
Can this be done without using REXX. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
How about using SAS? COBOL? |
|
Back to top |
|
|
onesaggi
New User
Joined: 22 Dec 2010 Posts: 5 Location: Mumbai
|
|
|
|
COBOL will be great! could you please show me the code to accept file name from JCL? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
onesaggi
New User
Joined: 22 Dec 2010 Posts: 5 Location: Mumbai
|
|
|
|
Thanks a lot Superk!!
I am using IKJEFTSR and IKJTSOEV programs to avail DD name. Where can I find these programs in libraries? My compiler is unable to find them. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Why not have your input datasetname as a symbolic e.g.
Code: |
//DDNAME DD DSN=&INDSN,DISP=SHR/OLD |
and have your program accept a parameter which is the same as that for your DSN e.g.
Code: |
//STEP EXEC PGM=MYPGM,
// PARM= &INDSN |
|
|
Back to top |
|
|
onesaggi
New User
Joined: 22 Dec 2010 Posts: 5 Location: Mumbai
|
|
|
|
Thanks Nic.
I am trying with your option. I want to write the DSN name of INDSN into output file by MYPGM. I am new to cobol. could you please guide me the way to extract file name from the address of INDSN?
Thanks in advance! |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If you are new to Cobol, you might want to try Use [URL] BBCode for External Links which is for Beginners and Students.
If you want to go Nick's route, search this forum for examples of passing the PARM to a Cobol program. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I think that you are certainly right Vasanthz. Thanks.
Proving once again the value of the Preview button, and clicking on the link. I wonder if it would have come back to the "recursive" topic?
EDIT: In an all-round masterful display of brain-skills, I notice I also got Nic's name wrong. Sorry Nic.
Further EDIT: And Vasanthz's. Fixing now. Sorry Vasanthz. Spelling "round" correctly as well. Looks like it is going to be a good day :-) |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Its ok to be intoxicated at work on Friday :-) |
|
Back to top |
|
|
|