Page 1 of 1

Passing values to the SYSIN card

PostPosted: Sun Jan 20, 2013 12:50 am
by nikesh_rai
Hi,

Is it possible to pass value to the SYSIN card using some variable. for example I have set a value say

//     SET  STAR01=*


and I want to use this variable in sysin card with any condintion like:

//SYSIN    DD=*
    SORT FIELDS=COPY
    OMIT COND=(7,1,CH,EQ,STAR01)


I know, this code will not work, but can anyone suggest me how can i achieve it.

Re: Passing values to the SYSIN card

PostPosted: Sun Jan 20, 2013 1:33 am
by steve-myers
One word: NO.

You could write a utility that would provide JCL symbols through PARM data and apply the symbols to input data and write the completed data to a data set that is subsequently used as SYSIN data for another step. I, personally, do not have such a utility though I could write it if there was a requirement. For example -
//          SET X='SOME DATA'
//A        EXEC PGM=JCLSYM,PARM='Y=&X'
//INPUT     DD  *
Y IS &Y
//OUTPUT    DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1)
//B        EXEC PGM=APGM
//SYSIN     DD  DISP=OLD,DELETE),DSN=*.A.OUTPUT

Re: Passing values to the SYSIN card

PostPosted: Sun Jan 20, 2013 1:44 am
by nikesh_rai
thanks Steve.. :)
I will check this code tomorrow morning and will let you know the results..

Re: Passing values to the SYSIN card

PostPosted: Sun Jan 20, 2013 2:21 am
by BillyBoyo
If you have z/OS 1.13 you may be able to do include paramaterisation of DD * data.

If you have DFSORT you can achieve what you want by using JPn to pass named information from PARM and treat it as a "symbol" which you can use in your DFSORT control cards.