| IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc... Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
rarvins
Joined: 24 Jan 2007
Posts: 47
Location: India
|
| Posted: Tue Jul 08, 2008 9:15 pm Post subject: Job Name in SORT |
|
|
Hi,
I am trying to write a sort card that will add trailer record to a file. I have to put the job name in the trailer. As of now I am hard coding but I wanted to know if there is a way in DFSORT/ICETOOL to fetch the job name that is currently executing and print it in the file as a part of the trailer. Do we have a keyword or function that will fetch the job name?
Thanks |
|
| Back to top |
|
Skolusu
Joined: 07 Dec 2007
Posts: 314
Location: San Jose
|
| Posted: Tue Jul 08, 2008 9:40 pm Post subject: |
|
|
rarvins,
You can use the following DFSORT JCL which will give you the desired results
Code:
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
CURRJOB,S'&JOBNAME'
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL REMOVECC,
TRAILER1=('THE JOBNAME IS : ',CURRJOB)
/*
|
|
| Back to top |
|
rarvins
Joined: 24 Jan 2007
Posts: 47
Location: India
|
| Posted: Wed Jul 09, 2008 12:27 am Post subject: |
|
|
| Thank you very much for your help. |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|