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

Alternative to CALL tso command


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

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Fri Aug 29, 2014 12:06 am
Reply with quote

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
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Aug 29, 2014 12:27 am
Reply with quote

//ISPFBTCH EXEC PGM=IKJEFT01,
// DYNAMNBR=30,REGION=4096K
//ISPLLIB DD DSN=MY.LOAD.LIB,DISP=SHR


TSO CALL *(MYPROG)
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Fri Aug 29, 2014 12:29 am
Reply with quote

Thanks. Somehow I missed that part of the syntax.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Aug 29, 2014 1:24 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Aug 29, 2014 1:29 am
Reply with quote

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
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Fri Aug 29, 2014 1:50 am
Reply with quote

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
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Fri Aug 29, 2014 2:43 am
Reply with quote

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
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top