Page 1 of 1

Address TSO CALL, problem

PostPosted: Wed Nov 18, 2015 10:14 pm
by samjovial
Hi All,

I have a strange problem. I am calling a load module XYZ using Address TSO CALL with parameters, its working fine when the script is invoked from IKJEFT01. The same script after compiling and executing throwing return code -3 after the CALL.

What could be the problem, pls help.

Re: Address TSO CALL, problem

PostPosted: Wed Nov 18, 2015 11:16 pm
by NicC
It is NOT "throwing" anything. It is giving/showing/abending/ending with... Nothing on the mainframe is 'thrown'.

Sjow how you are trying to execute the program both before and after the compile.

Re: Address TSO CALL, problem

PostPosted: Thu Nov 19, 2015 1:19 am
by samjovial
Hi Nick,

The call is same before and after the compile. Which is as below.

Address TSO "CALL *(PGMNM) '"parms"'"

Re: Address TSO CALL, problem

PostPosted: Thu Nov 19, 2015 2:48 am
by Pedro
Your question is not clear.
its working fine when the script is invoked from IKJEFT01.

but not working fine when it is invoked some other way??

My guess is that you are invoking the compiled program as a batch job with // EXEC PGM=PGMNM

Think of this environment as an application stack. You cannot invoke TSO services without first making those services available by starting TSO. I think you had a similar post about 'urgent!!'... similarly, you cannot invoke ISPF services without first starting ISPF.

You need to do something like this:
your program #1 -> start TSO -> start ISPF -> your program #2

Where program #1 only uses MVS services
and program #2 may use TSO and ISPF services

My suggestion for program #1 is to try:
myispf = 'ISPSTART CMD(%myprog2)'
Address ATTCHMVS 'IKJEFT01 myispf'

I do not think you need to compile program #2.

Re: Address TSO CALL, problem

PostPosted: Thu Nov 19, 2015 3:10 pm
by samjovial
Hi Pedro,

Thanks for your inputs.
I tried, the program is ending with return code -71

Below is the code

prog1 (compiled)
--------
/* REXX */
myispf='ISPSTART CMD(%TEST1)'
Address ATTCHMVS 'IKJEFT01 myispf'

prog2
---------
/* REXX */
Say 'test1'

JCL

//step1 exec pgm=prog1
//steplib DD DSN=load library of prog1
//sysexec DD DSN=prog2 rexx source
//systsprt dd

Re: Address TSO CALL, problem

PostPosted: Thu Nov 19, 2015 3:20 pm
by NicC
Please get my name right!
Please use the code tags when posting anything that would appear on the screen - code, data, formatted text.
Have you looked up to find out what a -71 is?

Re: Address TSO CALL, problem

PostPosted: Thu Nov 19, 2015 8:42 pm
by samjovial
Hi Nicc,

Pedro asked me to try something.

Regarding RC -71, I couldn't find anything about that return code.