IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX/COBOL using IKJEFT01 - RC 0 but no Output


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthik.ilangovan

New User


Joined: 05 Dec 2006
Posts: 27
Location: India

PostPosted: Mon Nov 29, 2010 2:23 pm
Reply with quote

Hi,

I am trying to running a REXX Exec via IKJEFT01 utility. Please see below..
Note : Excluded some lines from below JCL to make it look Short...

//ISPFBACK EXEC PGM=IKJEFT01,DYNAMNBR=25,REGION=1024K
//ISPPROF DD DISP=NEW,UNIT=SYSDA,SPACE=(TRK,(1,1,1)),
// DCB=(LRECL=80,BLKSIZE=8000,RECFM=FBA)
//ISPPLIB DD DSN=T0920KE.PDS.REXX.PANELS,DISP=SHR
//ISPMLIB DD DSN=CORP.ISPMLIB,DISP=SHR
- - - - - - - - - - - - - - - - 5 Line(s) not
//ISPSLIB DD DSN=CORP.ISPSLIB,DISP=SHR
- - - - - - - - - - - - - - - - 4 Line(s) not
//ISPTLIB DD DSN=CORP.ISPTLIB,DISP=SHR
- - - - - - - - - - - - - - - - 4 Line(s) not
//ISPCTL0 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPCTL1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPWRK1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPLST1 DD DISP=(NEW,DELETE),SPACE=(TRK,(10,10)),
// DCB=(LRECL=133,BLKSIZE=0,DSORG=PS,RECFM=VB)
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPLIST DD SYSOUT=*,DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//ISPLLIB DD DSN=T0920KE.PDS.REXX.LOADLIB,DISP=SHR
//SYSTSPRT DD DSNAME=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(&CALLREXX) /* INVOKE rexx DIALOG */
/*

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

Thanks,
Karthik.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Nov 29, 2010 2:41 pm
Reply with quote

Take a look at your SYSTSPRT. It looks odd...

O.
Back to top
View user's profile Send private message
karthik.ilangovan

New User


Joined: 05 Dec 2006
Posts: 27
Location: India

PostPosted: Mon Nov 29, 2010 2:55 pm
Reply with quote

Hi,

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

Thanks,
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 29, 2010 3:01 pm
Reply with quote

try using PROF NOPREFIX
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 29, 2010 3:03 pm
Reply with quote

Have you used TRACE to see what is happening ?

You also realise that & substitution for SYSIN statements doesn't work.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 29, 2010 3:10 pm
Reply with quote

Quote:
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
Back to top
View user's profile Send private message
karthik.ilangovan

New User


Joined: 05 Dec 2006
Posts: 27
Location: India

PostPosted: Mon Nov 29, 2010 3:24 pm
Reply with quote

Expat,

Thank You. I changed the & to a % and the REXX is getting invoked now.

ISPSTART CMD(%CALLREXX)

Enrico,

Thank You. My Say statements came out in SYSTSPRT. Here's my ISPF Log that i have routed to SYSOUT. Do i still need to push it to an Output Dataset ?

1 Time *** ISPF transaction log ***

04:44 Start of ISPF Log - - - - Session # 1 ---
04:44 TSO - Command - - %CALLREXX
04:44 End of ISPF Log - - - - - Session # 1 ---

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 ?

Thanks,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon Nov 29, 2010 4:11 pm
Reply with quote

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 .
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Nov 29, 2010 5:10 pm
Reply with quote

Tracing options:
1. Run your ISPSTART with TEST and/or TRACE
2. Use ISPVCALL to log every ISPF internal call.

By the way, you can use ISPEXEC DISPLAY in batch, as long as you use it properly. See the fine manual.

O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top