Though, I am getting a RETURN CODE of 0.. But where do i see the output.. I have couple of SAY statements.. and I am also calling a COBOL Load which in turn displays an ISPF Panel. The below REXX works individually perfectly. But in Batch, I am not sure where it will display the Panel and where it will Print the SAY Instructions.. Please help.
/* REXX CALLREXX */
SAY THIS IS 'A'
ADDRESS TSO "CALL 'T0920KE.PDS.REXX.LOADLIB(DISPPANL)'
SAY THIS IS 'A' AGAIN
EXIT 0
Also, Can we use the same JCL to run a COBOL Program instead of REXX.. Will it pick the COBOL Load from the ISPLLIB Library ??
Sorry, I did correct that to //SYSTSPRT DD SYSOUT=* (Just pasted it incorrectly over here)..
This is what comes out in SYSTSPRT... READY
ISPSTART CMD(&CALLREXX) /* INVOKE REXX DIALOG */
T0920KE.T0920KE1.JOB07031.D0000102.? was preallocated (no free was done).
T0920KE.T0920KE1.JOB07031.D0000103.? was preallocated (no free was done).
READY
END
Still Can't see the Output from the SAY Statements and don't see the Panel thats supposed to be displayed...
But in Batch, I am not sure where it will display the Panel and where it will Print the SAY Instructions..
in batch there will no panel displayed
( You will get an error for an "Address ISPEXEC DISPLAY ..." )
the SAY instruction will <say> what it has to <say> on SYSTSPRT
as said somewhere else...
did You check ALL the ISPF services return codes
usually when You get a final 0 return code, and <nothing> happens, no messages are issued
the return code for single funtion calls is ... let' s say flaky(*)
to see exactly what is going on from the ispf point of view
allocate the ispf log to an output dataset
(*) unreliable
So, there seems to be no Trace of the Call from REXX to COBOL.. But I know that the control IS definitely going into the COBOL Program for the SYSOUT displays something that I am displaying from within the COBOL Program.... Only curious that the Display from from within the COBOL (Using ISPLINK) is not working.. - As You said - Maybe from Batch the PANEL will not be Invoked... This is my COBOL and the 'CALL SUCCESS' is displayed in SYSOUT for me ? Should I try something like NEWAPPL(ISR) in the ISPSTART Command ?
PROCEDURE DIVISION.
MOVE "DISPLAY " TO ISPF-SERVICE.
MOVE "WHATUP " TO ISPF-PANEL-NAME.
CALL "ISPLINK" USING ISPF-SERVICE ISPF-PANEL-NAME.
IF RETURN-CODE NOT = 0
DISPLAY 'RETURN-CODE IS : ' RETURN-CODE
DISPLAY 'CALL FAILED'
END-IF.
CALL 'ISPLINK' USING ISP-VAR.
IF RETURN-CODE = 0 THEN
DISPLAY 'CALL SUCCESS'
END-IF.
STOP RUN.
EXIT.
Also, Can i execute the above COBOL Directly via the same IKJEFT01 JCL ?
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
Be aware that when you invoke TSO by its IKJEFT01 (foreground) entry point, it will suppress all non-return codes and convert all abends to RC=12. Moreover, running ISPF in the background will also cause non-return codes to be suppressed. I recommend invoking the background TSO entry point IKJEFT1B and using ZISPFRC to expose the return code .