|
|
| Author |
Message |
rarvins
New User
Joined: 24 Jan 2007 Posts: 42 Location: India
|
|
|
|
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 |
|
 |
References
|
Posted: Tue Jul 08, 2008 9:15 pm Post subject: Re: Job Name in SORT |
 |
|
|
 |
Skolusu
DFSORT Developer
Joined: 07 Dec 2007 Posts: 233 Location: San Jose
|
|
|
|
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
New User
Joined: 24 Jan 2007 Posts: 42 Location: India
|
|
|
|
| Thank you very much for your help. |
|
| Back to top |
|
 |
|
|