Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Job Name in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
rarvins

Active User


Joined: 24 Jan 2007
Posts: 51
Location: India

PostPosted: Tue Jul 08, 2008 9:15 pm    Post subject: Job Name in SORT
Reply with quote

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
View user's profile Send private message
References
Skolusu

DFSORT Developer


Joined: 07 Dec 2007
Posts: 357
Location: San Jose

PostPosted: Tue Jul 08, 2008 9:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rarvins

Active User


Joined: 24 Jan 2007
Posts: 51
Location: India

PostPosted: Wed Jul 09, 2008 12:27 am    Post subject:
Reply with quote

Thank you very much for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1