View previous topic :: View next topic
|
Author |
Message |
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
The tso CALL command requires that I specify the loadlib dataset along with the module name. ie
Code: |
TSO CALL 'my.load.lib(mypgm)' |
Is there an alternative command to run a program and tso will search the STEPLIB for the module?
Code: |
//STEPLIB DD DSN=MY.LOAD.LIB,DISP=SHR
//SYSTSIN DD *
???? MYPGM |
I plan to run this in batch. I browsed the TSO COMMAND manual but could not find such a command. |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
//ISPFBTCH EXEC PGM=IKJEFT01,
// DYNAMNBR=30,REGION=4096K
//ISPLLIB DD DSN=MY.LOAD.LIB,DISP=SHR
TSO CALL *(MYPROG) |
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
Thanks. Somehow I missed that part of the syntax. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
CALL *(PROGRAM) is fairly recent.
Just about the first command processor I wrote for TSO (for MVT!) provided the equivalent of CALL *. Now I hardly ever use it. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Sorry to nitpick... I question the title of the topic: "call TSO command"
You do not want to call a TSO command because it will call it with a standard MVS parameter list. A TSO command wants to be called with a CPPL parameter list.
To run as a TSO command, it should work just by specifying the member name.
Code: |
//STEPLIB DD DSN=MY.LOAD.LIB,DISP=SHR
//SYSTSIN DD *
MYPGM |
To run as an MVS program, specify the name in the EXEC JCL statement. |
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
My mistake. The title should have been "Alternative to tso CALL command". Mickeydusaor showed that the CALL command can do what I wanted. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
Pedro - I understood jerryte's intention right off. Among other things, CALL transforms a command line to the equivalent of // EXEC PGM=xxx,PARM=zz and then starts of the program using ATTACH. If you use the full form, CALL dataset(member), CALL allocates the data set using dynamic allocation, opens the data set, and uses ATTACH with the TASKLIB option to start the program.
The fullest form of my alternate to CALL tests if DD name USERLIB, or a DD name specified in the command line, is allocated, and uses it as a tasklib, which provides slightly more flexibility than the single library you can use with CALL. It also provides the ability to send either a specified or predefined DD list to the program, and it has an option to display the return code from the program. It also has an option to invoke a program as a command processor, though TSOLIB is a much better way to do this. |
|
Back to top |
|
|
|