Loading ...
Sorry, an error occurred while loading the content.

IKJFET01

Expand Messages
  • jsantamariaf@ACERALIA.ES
    Hi all. We are trying to send arguments to an exec in batch, but when the number of characters are over 80 the JCL fails. Is there some method to send any
    Message 1 of 2 , Jun 3, 2002
    View Source
    • 0 Attachment
      Hi all.
      We are trying to send arguments to an exec in batch, but when the number of
      characters are over 80 the JCL fails. Is there some method to send any
      number of characters to an exec?
      This is the example:

      JCL

      //PGPEMAIL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
      //*
      //PASO01 EXEC PROC=SENDMAIT,
      // TXT=12345678901234567890123456789012345678901234567890123456789012,
      // DSN=DISCO.EMAIL.X1234567.X1234567,
      // APLIC=12345678901234567890123456789012345678901234567890,
      // EXTEN=XLS


      PROC SENDMAIT

      //SENDMAIT PROC DSN=DISCO.EMAIL.DATOS,
      // TXT='Envio un adjunto .TXT desde HOST',
      // APLIC=ZZZ,EXTEN=XLS
      //* =========================================================
      //* =========================================================
      //PASO1 EXEC PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,
      // PARM='EMAITV11 &APLIC &EXTEN &TXT'
      //SYSEXEC DD DSN=GENERAL.CLIST,DISP=SHR
      //SYSTSPRT DD SYSOUT=*
      //SYSTSIN DD DUMMY
      //FICHENT DD DSN=&DSN,DISP=OLD

      THE RESULT
      8.21.25 JOB30960 ---- MONDAY, 03 JUN 2002 ----
      8.21.25 JOB30960 IRR010I USERID PS07D IS ASSIGNED TO THIS JOB.
      8.21.25 JOB30960 IEF452I PGPEMAIL - JOB NOT RUN - JCL ERROR
      8.21.25 JOB30960 $HASP396 PGPEMAIL TERMINATED
      ----- JES2 JOB STATISTICS ------
      03 JUN 2002 JOB EXECUTION DATE
      11 CARDS READ
      50 SYSOUT PRINT RECORDS
      0 SYSOUT PUNCH RECORDS
      3 SYSOUT SPOOL KBYTES
      0.00 MINUTES EXECUTION TIME
      ---------------------------------------------------------------------------------------------------------------------------------------
      //PGPEMAIL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
      //PASO01 EXEC PROC=SENDMAIT,
      // TXT=12345678901234567890123456789012345678901234567890123456789012,
      // DSN=DISCO.EMAIL.X1234567.X1234567,
      // APLIC=12345678901234567890123456789012345678901234567890,
      // EXTEN=XLS
      XXSENDMAIT PROC DSN=DISCO.EMAIL.DATOS,
      XX TXT='Envio un adjunto .TXT desde HOST',
      XX APLIC=ZZZ,EXTEN=XLS
      XX* =========================================================
      XX* LONGITUD DE REGISTRO DEL FICHERO A ENVIAR = 80
      XX*
      XX* SENDMAIL: ENVIO DE CORREO ELECTRONICO DESDE APLICACIONES
      XX* HOST

      ---------------------------------------------------------------------------------------------------------------------------------------

      XXPASO1 EXEC PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,
      XX PARM='EMAITV11 &APLIC &EXTEN &TXT'
      IEFC653I SUBSTITUTION JCL - PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,PARM
      ='EMAITV1
      12345678901234567890123456789012345678901234567890 XLS
      12345678901234567890123456789012345678901234567890123456789012'
      XXSYSEXEC DD DSN=GENERAL.CLIST,DISP=SHR
      XXSYSTSPRT DD SYSOUT=*
      XXSYSTSIN DD DUMMY
      XXFICHENT DD DSN=&DSN,DISP=OLD
      IEFC653I SUBSTITUTION JCL - DSN=DISCO.EMAIL.X1234567.X1234567,DISP=OLD

      ---------------------------------------------------------------------------------------------------------------------------------------

      5 IEF642I EXCESSIVE PARAMETER LENGTH IN THE PARM FIELD

      Thanks in advance.
    • Bob Stark
      Jsantamaria: You should be able to get 100 characters in via JCL. I beleive the PARM keyword should use Parentheses, and the individual parms must continue
      Message 2 of 2 , Jun 3, 2002
      View Source
      • 0 Attachment
        Jsantamaria:

        You should be able to get 100 characters in via JCL. I beleive the PARM
        keyword should use Parentheses, and the individual parms must continue (end
        in a comma).
        // PARM=('12345678...',
        // '12345678',
        // '1234567890')

        However, 100 isn't much bigger than 80. A general purpose strategy I've
        used is to support the same parms coming in from PARM or from a SYSIN DD
        card. So if there are a few, just pass them via PARM, but if there are a
        lot, pass them via SYSIN DD (or any other DDNAME you choose).

        If you want to allow overrides to the SYSIN data via the PARM statement,
        here is a way to do that:
        1. Read and process SYSIN
        2. Process PARM arguments overtop of the SYSIN data using a "last value
        wins" strategy.

        I have a keyword parser routine that supports TSO style keywords that makes
        this process pretty painless. Write back if you'd like a copy of it.

        Regards,
        Bob Stark

        At 06:32 PM 6/3/02 +0200, you wrote:
        >Hi all.
        >We are trying to send arguments to an exec in batch, but when the number of
        >characters are over 80 the JCL fails. Is there some method to send any
        >number of characters to an exec?
        >This is the example:
        >
        >JCL
        >
        >//PGPEMAIL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
        >//*
        >//PASO01 EXEC PROC=SENDMAIT,
        >// TXT=12345678901234567890123456789012345678901234567890123456789012,
        >// DSN=DISCO.EMAIL.X1234567.X1234567,
        >// APLIC=12345678901234567890123456789012345678901234567890,
        >// EXTEN=XLS
        >
        >
        >PROC SENDMAIT
        >
        >//SENDMAIT PROC DSN=DISCO.EMAIL.DATOS,
        >// TXT='Envio un adjunto .TXT desde HOST',
        >// APLIC=ZZZ,EXTEN=XLS
        >//* =========================================================
        >//* =========================================================
        >//PASO1 EXEC PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,
        >// PARM='EMAITV11 &APLIC &EXTEN &TXT'
        >//SYSEXEC DD DSN=GENERAL.CLIST,DISP=SHR
        >//SYSTSPRT DD SYSOUT=*
        >//SYSTSIN DD DUMMY
        >//FICHENT DD DSN=&DSN,DISP=OLD
        >
        >THE RESULT
        >8.21.25 JOB30960 ---- MONDAY, 03 JUN 2002 ----
        >8.21.25 JOB30960 IRR010I USERID PS07D IS ASSIGNED TO THIS JOB.
        >8.21.25 JOB30960 IEF452I PGPEMAIL - JOB NOT RUN - JCL ERROR
        >8.21.25 JOB30960 $HASP396 PGPEMAIL TERMINATED
        >----- JES2 JOB STATISTICS ------
        > 03 JUN 2002 JOB EXECUTION DATE
        > 11 CARDS READ
        > 50 SYSOUT PRINT RECORDS
        > 0 SYSOUT PUNCH RECORDS
        > 3 SYSOUT SPOOL KBYTES
        > 0.00 MINUTES EXECUTION TIME
        >---------------------------------------------------------------------------------------------------------------------------------------
        >//PGPEMAIL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
        >//PASO01 EXEC PROC=SENDMAIT,
        >// TXT=12345678901234567890123456789012345678901234567890123456789012,
        >// DSN=DISCO.EMAIL.X1234567.X1234567,
        >// APLIC=12345678901234567890123456789012345678901234567890,
        >// EXTEN=XLS
        >XXSENDMAIT PROC DSN=DISCO.EMAIL.DATOS,
        >XX TXT='Envio un adjunto .TXT desde HOST',
        >XX APLIC=ZZZ,EXTEN=XLS
        >XX* =========================================================
        >XX* LONGITUD DE REGISTRO DEL FICHERO A ENVIAR = 80
        >XX*
        >XX* SENDMAIL: ENVIO DE CORREO ELECTRONICO DESDE APLICACIONES
        >XX* HOST
        >
        >---------------------------------------------------------------------------------------------------------------------------------------
        >
        >XXPASO1 EXEC PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,
        >XX PARM='EMAITV11 &APLIC &EXTEN &TXT'
        >IEFC653I SUBSTITUTION JCL - PGM=IKJEFT01,DYNAMNBR=256,REGION=1024K,PARM
        >='EMAITV1
        >12345678901234567890123456789012345678901234567890 XLS
        >12345678901234567890123456789012345678901234567890123456789012'
        >XXSYSEXEC DD DSN=GENERAL.CLIST,DISP=SHR
        >XXSYSTSPRT DD SYSOUT=*
        >XXSYSTSIN DD DUMMY
        >XXFICHENT DD DSN=&DSN,DISP=OLD
        >IEFC653I SUBSTITUTION JCL - DSN=DISCO.EMAIL.X1234567.X1234567,DISP=OLD
        >
        >---------------------------------------------------------------------------------------------------------------------------------------
        >
        >5 IEF642I EXCESSIVE PARAMETER LENGTH IN THE PARM FIELD
        >
        >Thanks in advance.


        Regards,

        Bob Stark [ProTech - When you're serious about Systems Management]
        Consulting, Software, and Training for OS/390, UNIX and Internet
        www.protechtraining.com 800-373-9188 x150 412-445-8072
      Your message has been successfully submitted and would be delivered to recipients shortly.