Page 1 of 1

Passing value using temp variable in sysin card

PostPosted: Wed Jan 30, 2013 3:30 pm
by nikesh_rai
Hi,

I am trying to pass a value to the sysin card using temp variable, but getting some error. Here is my JCL

// SET RECLN=711                                               
//STEP001  EXEC PGM=SORT,PARM='JP1"&RECLN"'                   
//SORTIN   DD DISP=SHR,DSN=DPFCB84.C1207.C14T01.SVP022.SRTDBITS
//SORTOUT  DD DSN=DPFCB84.C1207.C14T01.SVP022.SRTDBITS.FLN,   
//            DISP=(NEW,CATLG,DELETE),                         
//            SPACE=(TRK,(10,10),RLSE),                       
//            UNIT=SYSDA,                                     
//            DCB=(RECFM=FB,LRECL=&RECLN)                     
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//SYSIN    DD *                                               
  OPTION COPY                                                 
  OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(5,JP1)                   
/*                                                             


It is conversion job where VB file will be converted into FB file. The file details will be coming from Online screen(file name and its length)
and the error I am getting is:

ICE270I 0 PROCESSING SYMNAMES STATEMENTS                                       
ICE280I 1 ORIGINAL STATEMENTS FROM SYSIN    FOLLOW                             
            OPTION COPY                                                         
            OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(5,JP1)                           
ICE282I 0 PERFORMING SYMBOL SUBSTITUTION AS NEEDED                             
ICE805I 1 JOBNAME: D393990B , STEPNAME: STEP001                                 
ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                                     
ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                                 
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AN
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 20:49 ON WED JA
            OPTION COPY                                                         
           OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(5,JP1)                           
                                                $                               
ICE007A E SYNTAX ERROR                                                         
ICE751I 0 C5-K76982 C6-K90026 C7-K82419 C8-K67572 E7-K79990                     
ICE052I 3 END OF DFSORT                                                         


Can you please help me out to resolve this issue.

Re: Passing value using temp variable in sysin card

PostPosted: Wed Jan 30, 2013 3:55 pm
by BillyBoyo
Because you can't do what you think you can do with JPn.

Include this in your step to see what the JP1 contains:

  OMIT COND=(1,3,CH,EQ,JP1)

Re: Passing value using temp variable in sysin card

PostPosted: Wed Jan 30, 2013 4:08 pm
by nikesh_rai
Thanks Billy,

I checked, it have value C'711' and that's why throwing error.. any workaround for this...
one option is there to use SYMNAMES card..
Please suggest me if any other better option is available.. I checked manual.. but didn't get except SYMNAMES..

Re: Passing value using temp variable in sysin card

PostPosted: Wed Jan 30, 2013 4:15 pm
by BillyBoyo
Well, that's a good place to look in the manual.

If you define a field as 5,711,CH

THE-DATA,5,711,CH


Then:

OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(THE-DATA)


Then you should get the behaviour that you want.

Now, if you want to use the JPn to set the value for the length, you can have a separate step to generate the SYMNAMES file (FB 80), as SORTOUT, with a symbol constructed from your JPn value then use that as the //SYMNAMES DD in the step which does the processing.

Re: Passing value using temp variable in sysin card

PostPosted: Wed Jan 30, 2013 7:51 pm
by nikesh_rai
Thanks Billy.. Its working now.. :)

Hi All,

Here is the code for your reference:

//STEP001  EXEC PGM=SORT
//SYMNAMES DD *                     
  RECLEN,5,711
//SORTIN   DD DISP=SHR,DSN=DPFCB84.C1207.C14T01.SVP022.SRTDBITS
//SORTOUT  DD DSN=DPFCB84.C1207.C14T01.SVP022.SRTDBITS.FLN,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(TRK,(10,10),RLSE),
//            UNIT=SYSDA,
//            DCB=(RECFM=FB,LRECL=&RECLN)
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  OUTFIL FNAMES=SORTOUT,VTOF,OUTREC=(RECLEN)
/*


later on, I will use temp data set for SYMNAMES.