IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Job Name in SORT

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
rarvins



Joined: 24 Jan 2007
Posts: 51
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: 356
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: 51
Location: India

Posted: Wed Jul 09, 2008 12:27 am    Post subject:  

Thank you very much for your help.
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM