OK, the snippet I pointed to was/is a bit sophisticated for a beginner
but since I am in a good mood here is a simpler snippet ( TESTED naturally )
the REXX SCRIPT
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
Trace "O"
Parse Source _sys _how _cmd .
If Sysvar(SYSISPF) /= "ACTIVE" Then Do
Say left(_cmd,8)"- Ispf is not active. Command not executed"
Exit 4
End
call $ispex "CONTROL ERRORS RETURN"
display = "DISPLAY PANEL(MFTEST1)"
do while ($ispex("DISPLAY PANEL(MFTEST1)") = 0 )
call $ispex "FTCLOSE"
zRC = $ispex("FTOPEN TEMP")
if zRC /= 0 then do
zerrsm = "FTOPEN ERROR"
zerrlm = left(_cmd,8)"- FTOPEN RC("zRC")"
call $ispex "SETMSG MSG(ISRZ001) "
iterate
end
zRC = $ispex("FTINCL MFTEST1")
if zRC /= 0 then do
zerrsm = "FTINCL ERROR"
zerrlm = left(_cmd,8)"- FTINCL RC("zRC")"
call $ispex "SETMSG MSG(ISRZ001) "
iterate
end
zRC = $ispex("FTCLOSE")
if zRC /= 0 then do
zerrsm = "FTCLOSE ERROR"
zerrlm = left(_cmd,8)"- FTCLOSE RC("zRC")"
call $ispex "SETMSG MSG(ISRZ001) "
iterate
end
call $ispex "VGET ZTEMPF"
call $ispex "VIEW DATASET('"ZTEMPF"') "
end
Exit
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$tsoex:
tso_0tr = trace("O")
Address TSO arg(1)
tso_0rc = rc
trace value(tso_0tr)
return tso_0rc
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$ispex:
isp_0tr = trace("O")
Address ISPEXEC arg(1)
isp_0rc = rc
trace value(isp_0tr)
return isp_0rc
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
$isred:
isr_0tr = trace("O")
Address ISREDIT arg(1)
isr_0rc = rc
trace value(isr_0tr)
return isr_0rc
the PANEL
)ATTR DEFAULT(%+_)
/* % TYPE(TEXT) INTENS(HIGH) defaults displayed for */
/* + TYPE(TEXT) INTENS(LOW) information only */
/* _ TYPE(INPUT) INTENS(HIGH) CAPS(ON) JUST(LEFT) */
$ TYPE(INPUT) INTENS(LOW) PAD(_) /* input field padded with '_' */
! TYPE(INPUT) INTENS(LOW) PAD(' ') /* input field padded with ' ' */
)BODY
%-------------------- TITLE FOR ENTRY PANEL --------------------------
%COMMAND ===>_ZCMD
%
+ 1 2 3 4 5
+ 12345678901234567890123456789012345678901234567890123456
+ 1 !var1 +
+ 2 !var2 +
+ 3 !var3 +
+ 3 !var4 +
+
)INIT
&var1='something'
)PROC
)END
The SKEL
//XXXXXXXX JOB (TEST),'MFTEST1',NOTIFY=XXXXXXXX
// CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//*
//* VAR1 = &VAR1
//* VAR2 = &VAR2
//* VAR3 = &VAR3
//* VAR4 = &VAR4
//*
//G EXEC PGM=IEFBR14