Step 3 - Provide a New Submit Screen

A new submit screen processes variables resolved during submission and builds a command to communicate with the dialog routines. Although the customized submit screen can have any appearance, use the following information to help you design your screens.

Procedure

  1. Use the generic submit screen (DGAXCUST) found in the sample library, $CD.SDGASAMP, as a base for creating the custom screen.
  2. Use the least number of input fields necessary when creating the screen to accomplish Process submission.
  3. Use existing variables from DGAXCUST, if possible. You can use any variable name, but fewer changes are necessary when you use the existing code. The following ISPF variables are used in the IBM® Connect:Direct® submit processing.
    Variable Explanation
    &PNAME1 Name of Process to be submitted
    &DSN File name containing Process to be submitted
    &SNODE Secondary node name
    &H HOLD specification
    &R RETAIN specification
    &PR Priority of the Process
    &NEWNAME New name for the Process being submitted
    &CLS Process class
    &NOTIFY Notify IBM Connect:Direct user ID
    &PNODEID Security user ID at PNODE
    &PNODEPW Current security password at PNODE
    &PNODENPW New security password at PNODE
    &SNODEID Security user ID at SNODE
    &SNODEPW Current security password at SNODE
    &SNODENPW New security password at SNODE
    &DSYMBPARM Symbolic variable specification
    &STIME Start time value
    &SDATE Start day/date value
    &CMD1 Used in constructing command string
    &CMD2 Used in constructing command string
    &CMD3 Used in constructing command string
    &CMD4 Used in constructing command string
    Note: Do not change the &CMD1, &CMD2, &CMD3, and &CMD4 ISPF variables. The SUBMIT command string is built into these four variables.

    The following figure shows the ATTR and BODY sections of the customized submit screen CUSTSUBM. The ATTR section is the same as in the sample base screen, DGAXCUST. As seen in the BODY section, FROMDSN and TODSN are variables that are symbolically substituted when the general purpose Process APROC is submitted.

    )ATTR
      +  TYPE(TEXT) INTENS(LOW) SKIP(ON)
         :    TYPE(INPUT) INTENS(NON)
      #  TYPE(OUTPUT) INTENS(HIGH) JUST(ASIS) CAPS(OFF)
      @  TYPE(OUTPUT) INTENS(LOW) JUST(ASIS)
      ¢  PAD(_)
      )BODY
      #UNODE                                     + CUSTOMIZED SCREEN
      +CMD%= = > _ZCMD
      #STEXT                                     + TIME-&ZTIME
      %  COPY TO EXISTING FILE AT ANOTHER SITE   + DATE-&ZDATE
      %          EVERY DAY AT NOON               + JULIAN-&ZJDATE
      +   FILE TO BE SENT FROM HERE
        %  = = >   ¢FROMDSN                      +                  
      +
      +  NODE TO RECEIVE THE FILE
      %  = = >  ¢SNODE                           +
      +
      +  RECEIVING FILE ON ABOVE NODE
      +  = = >  ¢TODSN
                                                 +
  4. Make the necessary changes in the INIT section after deciding how you want to set up the screen. Initialize all INIT section variables to the appropriate default value. For CUSTSUBM, the INIT section is in the following figure.
    )INIT
     .ZVARS = '(V@SEC)'
      &NXTHELP = DMJSBMT1
     .CURSOR  = &FROMDSN            /*CHANGED  */
      &UNODE1 = &UNODE1
      &SPC    = ''
    ..&V@SEC  = 'N'
    ..IF (&PROC ~= 'Y')
         &STEXT    = ''
    /*  &PNAME1   = ''                DELETED  */
    /*  &DSN      = ''                DELETED  */
        &SNODE    = ''
    /*  &Q        = ''                DELETED  */
    /*  &H        = ''                DELETED  */
        &R        = 'Y'             /*CHANGED  */
    /*  &PR       = ''                DELETED  */
    /*  &NEWNAME  = ''                DELETED  */
    /*  &CLS      = ''                DELETED  */
        &STIME    = '12:00'         /*CHANGED  */
    /*  &SDATE    = ''                DELETED  */
    /*  &SYMBPARM = ''                DELETED  */
        &FROMDSN  = ''              /* ADDED   */
        &TODSN    = ''              /* ADDED   */
    /*  IF (&UNODE  = &LNODE)         DELETED  *
        &NOTIFY   = '%USER'
    /*  IF (&UNODE ~= &LNODE)         DELETED  */
    /*    &NOTIFY   = ''              DELETED  */
      IF (&PROC = 'Y')
        IF (&PROC# ~= 'NONE')
          .MSG = IUSB000I
        IF (&STEXT = '')
        .HELP = &NXTHELP
        IF (&STEXT ~= '')
        .HELP  = DMI@MSG

    The following changes are made in the INIT section:

    • The cursor field is changed to FROMDSN.
    • &R is changed to Y to indicate RETAIN=YES.
    • &STIME is changed to 12:00 to indicate STARTT=(,12:00).
    • &FROMDSN and &TODSN are added and initialized to blanks.
    • Lines which carry a DELETED comment are removed because they are no longer necessary.
  5. Make the necessary changes in the PROC section after deciding how you want to set up the screen. Verify PROC section field values and build the command string to submit the Process. For CUSTSUBM, the PROC section is in the following figures.
    )INIT
    )PROC
      &PROC# = 'NONE'
      &CMD = &ZCMD
      &SEL = TRANS( TRUNC (&ZCMD,'.')
             SPF,'PANEL(ISR@PRIM) NEWAPPL(ISR)'
             WHO,'PANEL(DMI@WHO)'
             SW,'PGM(DMICMD) PARM(&CB@)'
             M,'PANEL(DMI@MSG)'
             AUTH,'PANEL(DMI@AUTH)'
             ' ','PGM(DMICMD) PARM(&CB@)'
             *,'?' )
      &ZTRAIL = .TRAIL
     IF (&ZCMD = 'SW')
       &SPC = 'SLN'
     IF (&CMD = ' ')
        VER(&FROMDSN,NONBLANK)                       /* ADDED   */
        VER(&SNODE,NONBLANK)                         /* ADDED   */
        IF (&TODSN= '')                              /* ADDED   */
          &TODSN=&FROMDSN                            /* ADDED   */
    /*  VER(&PNAME1,NAME,MSG=IUSB001I)                 DELETED  */
    /*  IF (&PNAME1 ~= ' ')                            DELETED  */
    /*    IF (&DSN ~= ' ')                             DELETED  */
    /*      .MSG = IUSB002I                            DELETED  */
    /*      .CURSOR = PNAME1                           DELETED  */
    /*  IF (&DSN = ' ')                                DELETED  */
    /*    VER(&PNAME1,NONBLANK,MSG=IUSB003I)           DELETED  */
    /*  VER(&Q,LIST,Y,N,MSG=IUSB022I)                  DELETED  */
    /*  VER(&H,LIST,Y,N,C,MSG=IUSB005I)                DELETED  */
        VER(&R,LIST,Y,N,I,MSG=IUSB006I)
    /*  VER(&V@SEC,LIST,Y,N,I,MSG=IUSB006I)            DELETED  */
    /*  VER(&PR,RANGE,0,15,MSG=IUSB007I)               DELETED  */
    /*  VER(&NEWNAME,NAME,MSG=IUSB008I)                DELETED  */
    /*  VER(&CLS,RANGE,1,255,MSG=IUSB009I)             DELETED  */
        &USER = TRUNC(&NOTIFY,1)
        IF (&USER ~= %)
          VER(&NOTIFY,NAME,MSG=IUSB010I)
    &PROC = 'Y'
    
        &CMD1 = ' SUB PROC=APROC'                    /*CHANGED  */
        &CMD2 = ''
        &CMD3 = ''
        &CMD4 = &SYMBPARM
        IF (&PNAME1 ~= ' ')                          /*CHANGED  */
          &CMD1 = '&CMD1 PROC=&PNAME1'               /*CHANGED  */
        IF (&DSN ~= ' ')                             /*CHANGED  */
          &CMD1 = '&CMD1 DSN=&DSN'                   /*CHANGED  */
        IF (&SNODE ~= ' ')
          &CMD1 = '&CMD1 SNODE=&SNODE'
    /*  IF (&Q ~= ' ')                                 DELETED  */
    /*    &CMD1 = '&CMD1 REQUEUE=&Q'                   DELETED */
    /*  IF (&H ~= ' ')                                 DELETED  */
    /*    &CMD1 = '&CMD1 HOLD=&H'                      DELETED */
        IF (&R ~= ' ')
          &CMD1 = '&CMD1 RETAIN=&R'
    /*  IF (&PR ~= ' ')                                DELETED  */
    /*    &CMD1 = '&CMD1 PRTY=&PR'                     DELETED */
    /*  IF (&NEWNAME ~= ' ')                           DELETED  */
    /*    &CMD1 = '&CMD1 NEWNAME=&NEWNAME'             DELETED */
        IF (&NOTIFY ~= ' ')
          &CMD2 = ' NOTIFY=&NOTIFY'
          &PARMX   = ''
          &PARMX2  = ''
    /*  IF (&SDATE ~= ' ')                             DELETED  */
    /*    &PARMX = 'Y'                                 DELETED  */
    /*    &CMD2 = '&CMD2 STARTT=(&SDATE,'              DELETED */
        IF (&STIME ~= ' ')
          IF (&PARMX ~= 'Y')
            &PARMX  = 'Y'
            &PARMX2 = 'Y'
            &CMD2 = '&CMD2 STARTT=(,&STIME'
          IF (&PARMX2 ~= 'Y')
            &CMD2 = '&CMD2 &STIME'
        IF (&PARMX = 'Y')
          &CMD2 = '&CMD2'
    /*  IF (&CLS ~= '')                                DELETED  */
    /*    &CMD2 = '&CMD2 CLASS=&CLS'                   DELETED  */
    /*  IF (&V@SEC = 'Y')                              DELETED  */
    /*     &ZSEL = 'PANEL(DMIUSRID)'                   DELETED  */
        &CMD3= '&&DSN1=&FROMDSN'                     /*ADDED    */
        &CMD3= '&CMD3 &&DSN2=&TODSN'                 /* ADDED   */
    )END
    

    The following changes are made in the PROC section:

    • A verify is added for the &FROMDSN variable. It must be non-blank.
    • A verify is added for the &SNODE variable. It must be non-blank.
    • A test for blanks in &TODSN is added. If &TODSN is blank, it is set to &FROMDSN.
    • &CMD1 is changed to contain the string SUB PROC=APROC, the command default.
    • &CMD3 is added to contain the string &&DSN1=&FROMDSN. Symbolic substitution is accomplished with this addition. When APROC is submitted, &DSN1 is translated to whatever value is in the &FROMDSN file.
    • The next-to-last line is added to concatenate the string &&DSN2=&TODSN to the contents of &CMD3. When APROC is submitted, &DSN2 is translated to the value in &TODSN.
    • Lines which carry a DELETED comment are removed because they are no longer necessary.

      If Y12.FROMHERE is the file to be sent, CD.THERE is the node to receive the file, Z12.TOHERE is the receiving file, and the Process is APROC, then the command string is built as follows.

      SUB  PROC=APROC SNODE=CD.THERE RETAIN=Y NOTIFY=%USER      -
             STARTT=(,12:00) &DSN1=Y12.FROMHERE &DSN2=Z12.TOHERE

      When the Process APROC is submitted, it is resolved as follows.

      APROC PROCESS SNODE=CD.THERE NOTIFY=%USER
      STEP1 COPY FROM (SNODE DSN=Y12.FROMHERE DISP=SHR)               -
          TO   (DSN=Z12.TOHERE DISP=(SHR,KEEP))