How to pass a value in a file to symbolic parameter



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

How to pass a value in a file to symbolic parameter

Postby sudhir226 » Wed Oct 17, 2012 1:59 pm

Hi,

I have an requirement. I have an input file and it will contain only once record. i have to assign that value to a symbolic parameter
Input Data: 713

i have to assign the value to my symbolic parameter
Required out put
SET DDD = 713

so anyone please help me how can i assign the value from an input file to set parameter
sudhir226
 
Posts: 3
Joined: Wed Oct 17, 2012 1:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass a value in a file to symbolic parameter

Postby Robert Sample » Wed Oct 17, 2012 2:12 pm

Write a program in the language of your choice to read the file and create the JCL you want. The program -- or a utility (such as IEBGENER) n a separate step -- then writes the JCL to the internal reader, thereby submitting the job with your symbolic parameter.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to pass a value in a file to symbolic parameter

Postby sudhir226 » Wed Oct 17, 2012 4:36 pm

Hi Robert,

Input File:
//SETVAR01 SET DDD='719'


I wrote once sort step that will increment the DDD value.

//STEP0010 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=* 
//SORTIN   DD DSN=TRANSMIT.XXX.AUTO.DDD,DISP=SHR 
//SORTOUT  DD DSN=TRANSMIT.XXX.AUTO.DDD,DISP=SHR 
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                       
  OUTREC IFTHEN=(WHEN=(21,3,ZD,EQ,999),                 
           OVERLAY=(21:C'700')),                         
         IFTHEN=(WHEN=(21,3,ZD,NE,0),                   
           OVERLAY=(21:+1,ADD,21,3,ZD,EDIT=(TTT)))       


After that by using the file.. i have to assign that value to a symbolic parameter.

//         SET HLQ2=NPDBCBS
//         SET HLQ=DN6VM0BN
//SETVAR01 SET DDD=[color=#FF4000]'713' [/color]


So i want to assign the value to the DDD parameter. Please advice me whether we can use the value from the file and can we assign to the ddd parameter
sudhir226
 
Posts: 3
Joined: Wed Oct 17, 2012 1:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass a value in a file to symbolic parameter

Postby BillyBoyo » Wed Oct 17, 2012 5:12 pm

He's already done that.

Why call something DDD which can cause confusion with DDD as in the day-number a year?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: How to pass a value in a file to symbolic parameter

Postby sudhir226 » Wed Oct 17, 2012 6:22 pm

Hi,

No Billy... The DDD is not the no.of the day.

//******************************************
//SETVAR01 SET DDD='715'                     
//******************************************
//STEP01   EXEC  PGM=IEBGENER               
//OUTDD1   OUTPUT DEST=XXX,                 
//SYSUT1   DD  DISP=SHR,DSN=XXXX.XXXXX.D&DDD
//SYSUT2   DD  SYSOUT=A,OUTPUT=(*.OUTDD1),


so the DDD value has to be incremented and if the valu reaches 999 again we have to intialize that value with 700. So i have to change the DDD value every day... So i am not sure how can i assign a value from the file and assign to this symbolic parameter value
sudhir226
 
Posts: 3
Joined: Wed Oct 17, 2012 1:39 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass a value in a file to symbolic parameter

Postby BillyBoyo » Wed Oct 17, 2012 6:45 pm

I know it is not the number of the day. It has a number greater than 366 in it.

What I was saying is this: By using DDD you can cause confusion when someone looks at your JCL. They may think, quite naturally, that DDD SHOULD BE 366 or less! Why not call it DAYREF or DAYNO or something, you have some scope, so why pick out a dull DDD which is already in regular use for a different purpose.

Look at the JCL manual. Discover at what point the the JCL is "interpreted" into stuff that the system is going to use - at that same point, the JCL is effectively discarded. Now, suggest to us how you expect your scheme to work with that knowledge, other than by what Robert has already suggested, or by doing it under "TSO" in a language and then causing it to be SUBMITted.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post