Page 3 of 4

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 3:02 pm
by Quasar
Hi Folks/Sonal,

I still didn't get it, why do you want to run ISPF in batch?

Thank you very much,

Quasar.

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 3:50 pm
by Sonal C
Hi Quasar,

I am following this since I have to display a PANEL through a Rexx command which i can run through ispf. Like we have TSO COMMAND. Now this command is trgigering JCL which will do some functionality.

My panel is created. But i am facing issue while triggering job.

I am stucked with Maxcc 990. Trying to solve it.

Regards,
Sonal

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 4:05 pm
by enrico-sorichetti
My panel is created. But i am facing issue while triggering job.

did You try to run my sample from an INTERACTIVE TSO session ???

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 4:48 pm
by Sonal C
Enrico,

Not exactly sir. I used commands given by you and it helped me in coming till this level.

By today EOD i will try your sample for sure.

The Panel which i had posted is working fine. I used just 1
DISPLY PANEL(ABCD)
command and It is giving proper display.

once this panel gets input from user i will pass these inputs to jcl through REXX. then this JCL will perform functionality.

But currenlty JCL is not performing any functionality as I am unable to receive inputs to it.

As you guided again I did some changes and now encountered with different error :( :

ISPP331 BREDIMAX exceeded       -/-2 ;msg redisplays exceeded in batch mode.


Again used google and got to know some display limit is exceeding. so tried to use BREDIMAX with ISPSTART command but that also didnt worked.

Still trying to do changes.

Thank you for guiding me but still i need your help sir. :)

Regards,
Sonal

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 7:41 pm
by enrico-sorichetti
what is that You do not understand when everybody tells that DISPLAY PANEL in <batch> should not be used

RUN my example ASIS and tell if it works for Your setup

after that start modifying it for Your need

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 8:35 pm
by Pedro
what is that You do not understand when everybody tells that DISPLAY PANEL in <batch> should not be used


When you submit a batch job, the job runs asynchronously from your TSO session. There is no association with your TSO session. When the batch jobs tries to DISPLAY a panel, it does not work because it does not have a 3270 terminal. In batch, you have to get your input from parameters or from a file. You cannot prompt the user because there is no user.

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 8:52 pm
by Pedro
When you submit a batch job, the job runs asynchronously from your TSO session.


Fifty years ago, the batch job would consist of a stack of punched cards. You would take your stack of punched cards to a glass window and ask the computer operator to run your job. Several hours later, you could pick up your computer listing. There was no expectation that the batch job would somehow ask the user for input.

Much has improved since then. But batch jobs still cannot reach out to ask a TSO user for input.

Re: How to pass input from Rexx to JCL

PostPosted: Thu Mar 28, 2013 9:12 pm
by enrico-sorichetti
here is my previous snippet modified to run as a pure batch
the IEBGENER step is there to show the result of FTINCL

the REXX script
 EDIT       ENRICO.ISPF.EXEC(MFTEST1B) - 01.02              Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 /*                                                                   */
 000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000004 Trace "O"
 000005
 000006 Parse Source _sys _how _cmd . m
 000007
 000008 If Sysvar(SYSISPF) /= "ACTIVE" Then Do
 000009    Say left(_cmd,8)"- Ispf is not active. Command not executed"
 000010    Exit 4
 000011 End
 000012
 000013 call $ispex "CONTROL ERRORS RETURN"
 000014
 000015 Parse Arg var1 var2 var3 var4
 000016
 000017 do 1
 000018    call  $ispex "FTCLOSE"
 000019    zRC = $ispex("FTOPEN")
 000020    if zRC /= 0   then do
 000021        Say left(_cmd,8)"- FTOPEN RC("zRC")"
 000022        iterate
 000023    end
 000024    zRC = $ispex("FTINCL MFTEST1")
 000025    if zRC /= 0   then do
 000026        Say left(_cmd,8)"- FTINCL RC("zRC")"
 000027        iterate
 000028    end
 000029    zRC = $ispex("FTCLOSE")
 000030    if zRC /= 0   then do
 000031        zerrsm = "FTCLOSE ERROR"
 000032        Say left(_cmd,8)"- FTCLOSE RC("zRC")"
 000033        iterate
 000034    end
 000035 end
 000036
 000037 Exit
 000038
 000039 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000040 /*                                                                   */
 000041 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000042 $tsoex:
 000043    tso_0tr = trace("O")
 000044    Address TSO arg(1)
 000045    tso_0rc = rc
 000046    trace value(tso_0tr)
 000047    return tso_0rc
 000048
 000049 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000050 /*                                                                   */
 000051 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000052 $ispex:
 000053    isp_0tr = trace("O")
 000054    Address ISPEXEC arg(1)
 000055    isp_0rc = rc
 000056    trace value(isp_0tr)
 000057    return isp_0rc
 000058
 000059 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000060 /*                                                                   */
 000061 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000062 $isred:
 000063    isr_0tr = trace("O")
 000064    Address ISREDIT arg(1)
 000065    isr_0rc = rc
 000066    trace value(isr_0tr)
 000067    return isr_0rc
 000068
 ****** **************************** Bottom of Data ****************************
 


the SKEL ( same as the previous one)
 EDIT       ENRICO.ISPF.SKELS(MFTEST1) - 01.00              Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 //XXXXXXXX JOB (TEST),'MFTEST1',NOTIFY=XXXXXXXX
 000002 //             CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
 000003 //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 000004 //*
 000005 //* VAR1 = &VAR1
 000006 //* VAR2 = &VAR2
 000007 //* VAR3 = &VAR3
 000008 //* VAR4 = &VAR4
 000009 //*
 000010 //G       EXEC PGM=IEFBR14
 ****** **************************** Bottom of Data ****************************


the job submitted
  EDIT       ENRICO.ISPF.JCL(MFTEST1B) - 01.00               Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,
 000002 //             REGION=0M,
 000003 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
 000004 //*
 000005 //ISP     EXEC PGM=IKJEFT1A,
 000006 //        PARM='ISPSTART CMD(MFTEST1B ZZZZ1 ZZZZ2 ZZZZ3 ZZZZZZ)'
 000007 //SYSPROC   DD DISP=SHR,DSN=ENRICO.ISPF.EXEC
 000008 //ISPPROF   DD DISP=(,PASS),DSN=&&ISPPROF,
 000009 //             UNIT=SYSDA,SPACE=(CYL,(2,0,44)),
 000010 //             DCB=(RECFM=FB,LRECL=80)
 000011 //ISPPLIB   DD DISP=SHR,DSN=ISP.SISPPENU
 000012 //ISPMLIB   DD DISP=SHR,DSN=ISP.SISPMENU
 000013 //ISPSLIB   DD DISP=SHR,DSN=ISP.SISPSLIB
 000014 //          DD DISP=SHR,DSN=ENRICO.ISPF.SKELS
 000015 //ISPTLIB   DD DISP=SHR,DSN=ISP.SISPTENU
 000016 //SYSPRINT  DD SYSOUT=*
 000017 //SYSTSPRT  DD SYSOUT=*
 000018 //SYSTSIN   DD DUMMY
 000019 //ISPFILE   DD DISP=(,PASS),DSN=&&ISPFILE,
 000020 //             UNIT=SYSDA,SPACE=(CYL,(1,1)),
 000021 //             DCB=(RECFM=FB,LRECL=80)
 000022 //*
 000023 //IEB     EXEC PGM=IEBGENER
 000024 //SYSIN     DD DUMMY
 000025 //SYSPRINT  DD SYSOUT=*
 000026 //SYSUT1    DD DISP=(OLD,PASS),DSN=&&ISPFILE
 000027 //SYSUT2    DD SYSOUT=*
 ****** **************************** Bottom of Data ****************************


the FULL sysout
 1                         J E S 2  J O B  L O G  --  S Y S T E M  S Y S 1  --  N O D E  N 1             
0
 17.32.20 JOB02520 ---- THURSDAY,  28 MAR 2013 ----
 17.32.20 JOB02520  IRR010I  USERID ENRICO   IS ASSIGNED TO THIS JOB.
 17.32.20 JOB02520  ICH70001I ENRICO   LAST ACCESS AT 17:31:35 ON THURSDAY, MARCH 28, 2013
 17.32.20 JOB02520  $HASP373 ENRICO1  STARTED - INIT 1    - CLASS A - SYS SYS1
 17.32.20 JOB02520  IEF403I ENRICO1 - STARTED - TIME=17.32.20
 17.32.21 JOB02520  HTRT01I                                         CPU (Total)  Elapsed      CPU (TCB)    CPU (SRB)     Service
 17.32.21 JOB02520  HTRT02I Jobname  Stepname ProcStep    RC    I/O hh:mm:ss.th  hh:mm:ss.th  hh:mm:ss.th  hh:mm:ss.th     Units
 17.32.21 JOB02520  HTRT03I ENRICO1  ISP                  00    274       00.64        01.02        00.62        00.02     17681
 17.32.21 JOB02520  HTRT03I ENRICO1  IEB                  00     56       00.06        00.11        00.05        00.01      1561
 17.32.21 JOB02520  IEF404I ENRICO1 - ENDED - TIME=17.32.21
 17.32.21 JOB02520  HTRT06I
 17.32.21 JOB02520  HTRT04I ENRICO1  Job Service Totals         330       00.70        01.21        00.67        00.03     19242
 17.32.21 JOB02520  $HASP395 ENRICO1  ENDED
0------ JES2 JOB STATISTICS ------                                                                                                   
-  28 MAR 2013 JOB EXECUTION DATE                                                                                                   
-           27 CARDS READ                                                                                                           
-          165 SYSOUT PRINT RECORDS                                                                                                 
-            0 SYSOUT PUNCH RECORDS                                                                                                 
-           10 SYSOUT SPOOL KBYTES                                                                                                   
-         0.02 MINUTES EXECUTION TIME                                                                                               
 !! END OF JES SPOOL FILE !!
        1 //ENRICO1  JOB NOTIFY=&SYSUID,                                          JOB02520
          //             REGION=0M,                                                       
          //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X                               
          //*                                                                             
          IEFC653I SUBSTITUTION JCL - NOTIFY=ENRICO,REGION=0M,MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
        2 //ISP     EXEC PGM=IKJEFT1A,                                                   
          //        PARM='ISPSTART CMD(MFTEST1B ZZZZ1 ZZZZ2 ZZZZ3 ZZZZZZ)'               
        3 //SYSPROC   DD DISP=SHR,DSN=ENRICO.ISPF.EXEC                                   
        4 //ISPPROF   DD DISP=(,PASS),DSN=&&ISPPROF,                                     
          //             UNIT=SYSDA,SPACE=(CYL,(2,0,44)),                                 
          //             DCB=(RECFM=FB,LRECL=80)                                         
        5 //ISPPLIB   DD DISP=SHR,DSN=ISP.SISPPENU                                       
        6 //ISPMLIB   DD DISP=SHR,DSN=ISP.SISPMENU                                       
        7 //ISPSLIB   DD DISP=SHR,DSN=ISP.SISPSLIB                                       
        8 //          DD DISP=SHR,DSN=ENRICO.ISPF.SKELS                                   
        9 //ISPTLIB   DD DISP=SHR,DSN=ISP.SISPTENU                                       
       10 //SYSPRINT  DD SYSOUT=*                                                         
       11 //SYSTSPRT  DD SYSOUT=*                                                         
       12 //SYSTSIN   DD DUMMY                                                           
       13 //ISPFILE   DD DISP=(,PASS),DSN=&&ISPFILE,                                     
          //             UNIT=SYSDA,SPACE=(CYL,(1,1)),                                   
          //             DCB=(RECFM=FB,LRECL=80)                                         
          //*                                                                             
       14 //IEB     EXEC PGM=IEBGENER                                                     
       15 //SYSIN     DD DUMMY                                                           
       16 //SYSPRINT  DD SYSOUT=*                                                         
       17 //SYSUT1    DD DISP=(OLD,PASS),DSN=&&ISPFILE                                   
       18 //SYSUT2    DD SYSOUT=*                                                         
 !! END OF JES SPOOL FILE !!
 ICH70001I ENRICO   LAST ACCESS AT 17:31:35 ON THURSDAY, MARCH 28, 2013
 IEF236I ALLOC. FOR ENRICO1 ISP
 IEF237I 0AB4 ALLOCATED TO SYSPROC
 IGD100I VIO ALLOCATED TO DDNAME ISPPROF  DATACLAS (        )
 IEF237I 0A81 ALLOCATED TO ISPPLIB
 IEF237I 0A81 ALLOCATED TO ISPMLIB
 IEF237I 0A81 ALLOCATED TO ISPSLIB
 IEF237I 0AB1 ALLOCATED TO
 IEF237I 0A81 ALLOCATED TO ISPTLIB
 IEF237I JES2 ALLOCATED TO SYSPRINT
 IEF237I JES2 ALLOCATED TO SYSTSPRT
 IEF237I DMY  ALLOCATED TO SYSTSIN
 IGD100I VIO ALLOCATED TO DDNAME ISPFILE  DATACLAS (        )
 IEF237I 0AB2 ALLOCATED TO ISP17321
 IEF285I   ENRICO.SPFLOG1.LIST                          KEPT         
 IEF285I   VOL SER NOS= STOR02.                           
 IEF142I ENRICO1 ISP - STEP WAS EXECUTED - COND CODE 0000
 IEF285I   ENRICO.ISPF.EXEC                             KEPT         
 IEF285I   VOL SER NOS= STOR04.                           
 IEF285I   SYS13087.T173220.RA000.ENRICO1.ISPPROF.H01   PASSED       
 IEF285I   ISP.SISPPENU                                 KEPT         
 IEF285I   VOL SER NOS= ZARES2.                           
 IEF285I   ISP.SISPMENU                                 KEPT         
 IEF285I   VOL SER NOS= ZARES2.                           
 IEF285I   ISP.SISPSLIB                                 KEPT         
 IEF285I   VOL SER NOS= ZARES2.                           
 IEF285I   ENRICO.ISPF.SKELS                            KEPT         
 IEF285I   VOL SER NOS= STOR01.                           
 IEF285I   ISP.SISPTENU                                 KEPT         
 IEF285I   VOL SER NOS= ZARES2.                           
 IEF285I   ENRICO.ENRICO1.JOB02520.D0000101.?           SYSOUT       
 IEF285I   ENRICO.ENRICO1.JOB02520.D0000102.?           SYSOUT       
 IEF285I   SYS13087.T173220.RA000.ENRICO1.ISPFILE.H01   PASSED       
 HTRT05I ------------------------------------------------------------------------
         - Step Termination Statistics                                          -
         -                                                                      -
         - Program Name       IKJEFT1A                          hh:mm:ss.th     -
         - Step Name          ISP               Elapsed Time          01.02     -
         - Procedure Step                       TCB CPU Time          00.62     -
         - Return Code              00          SRB CPU Time          00.02     -
         - Total I/O               274          Total CPU Time        00.64     -
         - Service Units         17681                                          -
         -                                                                      -
         - Region Size           9192K          Pages Paged               0     -
         - Data/Hiperspace          0M          Pages Swapped             0     -
         - ASID Swaps                0          Pages Stolen              0     -
         -                                      VIO (In and Out)        121     -
         -                                                                      -
         - --------Below 16Meg--------          --------Above 16Meg--------     -
         - Private Area          9192K          Private Area       1801216K     -
         - Max Allocated          424K          Max Allocated         1024K     -
         - LSQA And SWA           436K          LSQA And SWA         11136K     -
         -                                                                      -
         - DDName    Unit    Blksize       I/O                                  -
         - SYSPROC   0AB4      27920         2                                  -
         - *System*                        272                                  -
         -                                                                      -
         ------------------------------------------------------------------------
 IEF373I STEP/ISP     /START 2013087.1732
 IEF374I STEP/ISP     /STOP  2013087.1732 CPU    0MIN 00.62SEC SRB    0MIN 00.02SEC VIRT   424K SYS   436K EXT    1024K SYS   11136K
 IEF236I ALLOC. FOR ENRICO1 IEB
 IEF237I DMY  ALLOCATED TO SYSIN
 IEF237I JES2 ALLOCATED TO SYSPRINT
 IEF237I VIO  ALLOCATED TO SYSUT1
 IEF237I JES2 ALLOCATED TO SYSUT2
 IEF142I ENRICO1 IEB - STEP WAS EXECUTED - COND CODE 0000
 IEF285I   ENRICO.ENRICO1.JOB02520.D0000103.?           SYSOUT       
 IEF285I   ENRICO.ENRICO1.JOB02520.D0000104.?           SYSOUT       
 HTRT05I ------------------------------------------------------------------------
         - Step Termination Statistics                                          -
         -                                                                      -
         - Program Name       IEBGENER                          hh:mm:ss.th     -
         - Step Name          IEB               Elapsed Time          00.11     -
         - Procedure Step                       TCB CPU Time          00.05     -
         - Return Code              00          SRB CPU Time          00.01     -
         - Total I/O                56          Total CPU Time        00.06     -
         - Service Units          1561                                          -
         -                                                                      -
         - Region Size           9192K          Pages Paged               0     -
         - Data/Hiperspace          0M          Pages Swapped             0     -
         - ASID Swaps                0          Pages Stolen              0     -
         -                                      VIO (In and Out)          2     -
         -                                                                      -
         - --------Below 16Meg--------          --------Above 16Meg--------     -
         - Private Area          9192K          Private Area       1801216K     -
         - Max Allocated          416K          Max Allocated            0K     -
         - LSQA And SWA           272K          LSQA And SWA         10784K     -
         -                                                                      -
         - DDName    Unit    Blksize       I/O                                  -
         - *System*                         56                                  -
         -                                                                      -
         ------------------------------------------------------------------------
 IEF373I STEP/IEB     /START 2013087.1732
 IEF374I STEP/IEB     /STOP  2013087.1732 CPU    0MIN 00.05SEC SRB    0MIN 00.01SEC VIRT   416K SYS   272K EXT       0K SYS   10784K
 IEF285I   SYS13087.T173220.RA000.ENRICO1.ISPPROF.H01   DELETED       
 IEF285I   SYS13087.T173220.RA000.ENRICO1.ISPFILE.H01   DELETED       
 IEF375I  JOB/ENRICO1 /START 2013087.1732
 IEF376I  JOB/ENRICO1 /STOP  2013087.1732 CPU    0MIN 00.67SEC SRB    0MIN 00.03SEC
 !! END OF JES SPOOL FILE !!
1 ENRICO.SPFLOG1.LIST has been kept.
 READY
 END
 !! END OF JES SPOOL FILE !!
1DATA SET UTILITY - GENERATE                                                                       PAGE 0001             
-IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT                                                 
                                                                                                                         
 PROCESSING ENDED AT EOD                                                                                                 
 !! END OF JES SPOOL FILE !!
//XXXXXXXX JOB (TEST),'MFTEST1',NOTIFY=XXXXXXXX                                 
//             CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)                               
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -         
//*                                                                             
//* VAR1 = ZZZZ1                                                               
//* VAR2 = ZZZZ2                                                               
//* VAR3 = ZZZZ3                                                               
//* VAR4 = ZZZZZZ                                                               
//*                                                                             
//G       EXEC PGM=IEFBR14                                                     
 !! END OF JES SPOOL FILE !!

Re: How to pass input from Rexx to JCL

PostPosted: Sat Mar 30, 2013 3:40 pm
by Quasar
Hi Sonal,

I have many questions -

1. Why do you want to do DISPLAY PANEL(MYPANEL) in Batch?

2.
I am following this, since I have to display a PANEL through a Rexx command which i can run through ispf. Like we have TSO COMMAND. Now this command is triggering JCL which will do some functionality.
From what I gather, your Rexx should obtain inputs from a TSO user, using the MYPANEL.
a) Run your Rexx in fore-ground. I see no point, why you've tried to use IRXJCL.
b) Moreover, you can always invoke your Rexx/CLIST by issuing TSO <rexx-module> on the command-line, given that the Rexx/CLIST resides in the SYSPROC/SYSEXEC concatenations.

Correct me, if I am wrong.

All that, you had to do, was display an input panel, gather inputs, substitute them in the skeleton and off we go.

Thank you very much,

Quasar

Re: How to pass input from Rexx to JCL

PostPosted: Sat Mar 30, 2013 3:50 pm
by enrico-sorichetti
Quasar,
no reason to ask any more questions....
the TS was given ( by me )
a working snippet for a PANEL driven ISPF approach
a working snippet for a BATCH approach

so until the TS understands what he wants to do no reason to waste time on him :geek:
- the same questions were asked from the beginning without any reasonable answer
- unfortunately topics like this one most often do not reach any conclusion and result just in a waste of everybody' s time