View previous topic :: View next topic
|
Author |
Message |
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
Hello,
I have a vendor program which generally runs as a batch program with EXEC PGM=xxxx,PARM=(xxx). For some specific requirement, I am calling this program through a COBOL program after creating a dynamic TSO environment through IKJTSOEV and allocate all the required files by using TSO ALLOC and pass the control through CALL *(xxxxx). This runs fine. But there are some control paameters which is sent through the PARM. I am not able to figure out how to pass this parms to the target program. Could you please share any direction or advice which I can explore further? Thanks for your guidance in advance.
Regards,
AP |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
re: generally runs as a batch program with EXEC PGM=xxxx,PARM=(yyy)
I think you use the TSO CALL command:
Code: |
Addres TSO "CALL *(xxxx) yyy" |
|
|
Back to top |
|
|
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
Pedro wrote: |
re: generally runs as a batch program with EXEC PGM=xxxx,PARM=(yyy)
I think you use the TSO CALL command:
Code: |
Addres TSO "CALL *(xxxx) yyy" |
|
Thank you Pedro. I will test this as per your suggestion.
Regards,
AP |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
I have not done it for some time, if it does not work try also using single quotes:
Code: |
Address TSO "CALL *(xxxx) 'yyy'" |
|
|
Back to top |
|
|
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
Pedro wrote: |
I have not done it for some time, if it does not work try also using single quotes:
Code: |
Address TSO "CALL *(xxxx) 'yyy'" |
|
Just to update and thanks Pedro it works fine with single quotes.
Regards,
AP |
|
Back to top |
|
|
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
This is in continuation with the above post related with CALLing a program through IKJEFSTR. My program running as a Started Task --> CALLs Another Vendor Program (Authorized) which in turns invokes another vendor program (Not Authorized). I added the first level program in AUTHPGM (tried after adding with AUTHTSF section also). While the second level program gets controlled, it gives a S047 APF auth error. All the STEPLIB concatenations are APF auth. But interestingly, if I invoke the same program with REXX ADDRESS TSO with all the same LOADLIBs, it runs fine. It seems with IKJEFSTR and second level vendor program together has some issues.
I am thinking now to make it through REXX. If you can advise whether implementing a long running task through REXX in production environment is recommended or not. The REXX program will not do any FILE IO, it will retrieve rows of a DB2 table and pass the parameters to the Vendor program through CALL macro which will do all the work. Any comments on this approach is greatly appreciated. Thanks in advance !! |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Presumably, you meant IKJEFTSR.
From your explanation, it is not clear who is calling who. But in general, a program that is not authorized cannot call an authorized program because of reasons. It is in that situation where the non-authorized program uses IKJEFTSR to call the authorized program.
And the situation is complicated because you say they are vendor programs and frequently you are not given the source.
You did not indicate the status, but the authorized program needs to be link edited with AC(1). |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
You might be able to use ATTACH macro to invoke the authorized program. ATTACH creates a different TCB and, IIRC, should ignore the callers APF status.
non-auth program:
1. ATTACH for MYAUTH1
2. WAIT on ECB
MYAUTH1:
1. do the work
2. POST ECB |
|
Back to top |
|
|
@shim
New User
Joined: 28 Oct 2021 Posts: 10 Location: India
|
|
|
|
Thanks Pedro for the inputs. Yes it is somewhat complicated as we don't have the source of the Vendor programs. Finally I have been calling IKJEFT01 which in turn invoking the same CALL command as IKJEFSTR.
I had to make my program authorized and added the first level vendor program in AUTHPGM. With this the second level program which was giving S047 previously does not complain any more.
Thanks Again for all the help and directions!!
Regards,
Ashim |
|
Back to top |
|
|
|