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 !!