I am creating a Panel in which I am returning a value which is based on reading the dataset member.
Example:- In panel I am providing the dataset name and member and then system check the allocation of pds with member then in rexx program it will iterates from starting of program to end.
Then in rexx program I will increase the count of variable based on finding the particluar word in the member.
And at last I will display that count in my panel.
Now issue I am facing I am not getting the variable count value in ISPF panel.
)ATTR
! TYPE(TEXT) INTENS(HIGH) CAPS(ON) PAD(NULLS) COLOR(GREEN) SKIP(ON)
% TYPE (TEXT) INTENS (HIGH)
+ TYPE (TEXT) INTENS (LOW) SKIP (ON)
_ TYPE (INPUT) INTENS (HIGH) CAPS (ON) JUST(LEFT) COLOR(BLUE) PADC(_)
# TYPE (INPUT) INTENS(LOW) CAPS(ON) PAD('_') COLOR(YELLOW)
)BODY
%COMMAND ===>_ZCMD
+ A ISPF PANEL 1 - TRAINING TO DISPLAY O/P IN PANEL
+ ----------------------------------------------------------
+
+ %ENTER THE DATASET NAME ==> TEST.PDS.XXXX
+
+ %ENTER THE DATASET MEMBER IF EXISTING ==>_DSMEMB +
+
+ ! NUMBER OF TIMES SYNTAX PRESENT IS : #NBR +
+ +PRESS ENTER TO CONTINUE, PF3 TO EXIT +
+
+
+
)INIT
VGET(DSNAME,DSMEMB,NBR) PROFILE
)PROC
VPUT(DSNAME,DSMEMB,NBR) PROFILE
)END
Below is my rexx code
/* REXX */
ISPEXEC CONTROL DISPLAY REFRESH
"ISPEXEC LIBDEF ISPPLIB DATASET ID ('KINVPCF.FDC.PDS.SASH')"
"ISPEXEC VERASE (DSNAME,DSMEMB,NBR) PROFILE";
"ISPEXEC DISPLAY PANEL (P2)"
"ISPEXEC VGET (DSNAME,DSMEMB,NBR) PROFILE";
/*
SAY DSNAME
*/
DSNAME = SBIC.PDS.PROD.ABEND.LOGGER
IF DSMEMB = "" THEN
MIG_FILE1 = DSNAME
ELSE
MIG_FILE1 = DSNAME"("DSMEMB")"
CHKLIB = SYSDSN("'"MIG_FILE1"'")
IF CHKLIB <> 'OK' THEN DO
SAY 'ERROR - ' DSN 'NOT FOUND'
EXIT
END
M1 = 0
"ALLOC FI(PDS1) DA('"MIG_FILE1"') SHR REUSE"
"EXECIO * DISKR PDS1 (STEM PROC1. FINIS"
"FREE FI(PDS1)"
DO K =1 TO PROC1.0
IF POS('JOB NAME ',PROC1.K) <> 0 THEN DO
M1 = M1 + 1
END
END
SAY M1
NBR = M1
"ISPEXEC DISPLAY PANEL (P2)"
EXIT
Please tell me where it is getting wrong.Thanks in advance.