Create a header containing data passed by a job parm?



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Create a header containing data passed by a job parm?

Postby BSvihraJr » Thu Mar 20, 2008 3:24 am

If I had a JCL job and proc set up to run DFSORT, is there a way to pass a value through from the job into the proc (I can do this much) and reference that string within the DFSORT SYSIN code? I need to populate the header of an output file with the 8 position name of the job that's excuting.

Thanks in advance!
BSvihraJr
 
Posts: 15
Joined: Wed Nov 21, 2007 2:40 am
Has thanked: 0 time
Been thanked: 0 time

Re: Create a header containing data passed by a job parm?

 

Re: Create a header containing data passed by a job parm?

Postby MrSpock » Thu Mar 20, 2008 3:41 am

I'd use the EZACFSM1 (Symbol Translator) program to pass the executing jobname (&JOBNAME) into a temp file that can be assigned to the DFSORT SYMNAMES DD in the sort step.

Something like (untested):

//STEP1 EXEC PGM=EZACFSM1
//SYSIN DD *
JOB,&JOBNAME
/*
//SYSOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//*
//STEP2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD ...

There are no standard programs that convert a parameter passed via PARM='xxx' into a dataset for use as input in control statements for a utility.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Create a header containing data passed by a job parm?

Postby Frank Yaeger » Thu Mar 20, 2008 5:09 am

Mr. Spock,

You're a bit behind the times. DFSORT can create those kinds of symbols itself using S constants. You don't have to use another step to do it. For example, you could use this DFSORT job with &JOBNAME.

//S1  EXEC PGM=ICEMAN                 
//SYSOUT DD SYSOUT=*                   
//SYMNAMES DD *                       
JOB,S'&JOBNAME'                       
//SORTIN   DD *                       
RECORD           
//SORTOUT  DD SYSOUT=*                 
//SYSIN    DD *                       
  OPTION COPY                         
  OUTFIL HEADER1=(JOB)           
/*


For more information, see "System symbol string constants (S'string')" in my paper at:

http://www.ibm.com/servers/storage/supp ... /mvs/peug/
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post