Roger Strycova
Roger Strycova

Reputation: 109

Line continuation for inline/instream JCL code

If JCL allows only codes to be written from columns 1 to 72, how can I add more members in BIND MEMBER (ABC6PROG,ABC0PROG...)? I need to put at least 8 members in here.

//SYSTSIN  DD *                                                        
  DSN SYSTEM(DB9G)                                                     
  BIND MEMBER (ABC6PROG,ABC0PROG,ABC1PROG,ABC2PROG,ABC3PROG,ABC4PROG) -
  PLAN        (DSNTIA91) -                                             
  LIBRARY     ('DSN910.DB9G.DBRMLIB.DATA') -                           
  ACTION      (REP) -                                                  
  ISOLATION   (CS) -                                                   
  VALIDATE    (BIND) -                                                 
  RELEASE     (COMMIT) -                                               
  OWNER       (IBMUSER) -                                              
  QUALIFIER   (IBMUSER) -                                              
  ENCODING    (EBCDIC) -                                               
  REOPT       (VARS)                                                   
  END                                                                  
/*    

Upvotes: 1

Views: 3057

Answers (2)

phunsoft
phunsoft

Reputation: 2745

This data is sysin data, or instream data, i.e. data that is submitted as part of the JCL. As such, the length of the lines are limited by the record length of the JCL stream that you submit.

While the record length of JCL is usually 80 bytes, it can be longer. You just can't submit such JCL via TSO's SUBMIT. Don't believe it? Try this:

  1. Allocate a sequential data set with RECFM=VB, LRECL=254, and say DSN=userid.DATAVB.PS

  2. Store the following data in that data set. Add a JOB statement that fits your installation's requirements.

    //jobname  JOB ...
    //ST01     EXEC PGM=IEBGENER                                                                                                                            
    //SYSPRINT DD   SYSOUT=*                                                                                                                                
    //SYSIN    DD   DUMMY                                                                                                                                   
    //SYSUT1   DD   *                                                                                                                                       
    This is record 1, stored in a RECFM=VB, LRECL=254 data set, that has some data up to that position 250. (Remember 4 bytes are used to save the RDW. ==>¦
    This is record 2, stored in a RECFM=VB, LRECL=254 data set, that has some data up to that position 250. (Remember 4 bytes are used to save the RDW. ==>¦
    This is record 3, stored in a RECFM=VB, LRECL=254 data set, that has some data up to that position 250. (Remember 4 bytes are used to save the RDW. ==>¦
    This is record 4, stored in a RECFM=VB, LRECL=254 data set, that has some data up to that position 250. (Remember 4 bytes are used to save the RDW. ==>¦
    /*                                                                                                                                                      
    //SYSUT2   DD   SYSOUT=*
    
    

Note in the original post, there had been 3 backquotes at the end of the last line. That was a typo. The statement ends in SYSOUT=*

  1. Allocate another sequential data set with RECFM=FB, LRECL=80, and DSN=userid.DATAFB.PS

  2. Store the following data in that data set. Add a JOB statement that fits your installation's requirements.

    //jobbname JOB ... 
    //ST01     EXEC PGM=IEBGENER                             
    //SYSPRINT DD   SYSOUT=*                                 
    //SYSIN    DD   DUMMY                                    
    //SYSUT1   DD   DISP=SHR,DSN=userid.DATAVB.PS  
    //SYSUT2   DD   SYSOUT=(A,INTRDR)
    

Note in the original post, there had been 3 backquotes at the end of the last line. That was a typo. The statement ends in SYSOUT=(A,INTRDR)

  1. Now submit the data set userid.DATAFB.PS

The first job submits the second job throught the internal reader (INTRDR). Look at the output of the second job. You should see the five 250 byte records. So the instream data as well as the JCL statements were actually 250 byte records.

Now, back to th original quesiton. What you have in your SYSTSIN data is one TSO command (DSN ...), and a DSN subcommands with parameters. The first subcommand starts the DSN program, which will then read ist commands, starting with the BIND ...

TSO allows data in SYSTSIN to be splitted anywhere on the line by writting a space followed by a minus (-) or plus (+) sign as the last charaters on the line. TSO will merge the lines before working on the complete statement. TSO drops anything starting with the plus or minus sign in the first line. With the plus sign, TSO will drop leading space of the next line, with the minus sign, it leave the data asis. Continuation can go over several lines.

The line as it looks after merging by TSO must then adhere to the requirements of the program reading that data (DSN in this case).

Finally, JCL statements can have keywords and operands between positions 3 and 71, incl. Positions 1 and 2 are // for JCL. If positions 1 and 2 are not //, then this is not a JCL statement. Positions 72 it the JCL continuation indicator, which optinal, excet when continuting literal data (data in apostrophes). You should never code a nonblank character in position 72 (and thus avoid continuting literal data.) I never had to code a nonblank character in position 72 in 35+ year of working with JCL.

Upvotes: 1

James Anderson
James Anderson

Reputation: 27486

The SYSTSIN data is not subject to the same restrictions as JCL and follows the TSO command syntax rules.

The DB2 BIND statement is logically a single rather long line, the '-' indicating a continuation of the same line.

You should be able to spread the MEMBER parameters over more than one line.

just add a comma and dash after the ABC4PROG member and continue on the next line.

Upvotes: 3

Related Questions