Monday 11 March 2013

TSO CALL command


TSO CALL command:

Used to execute a Load Module- Binary executable form of program which was previously link edited.

If the first qualifier of the data set name containing the load module does not match your PREFIX (typically your userid) or if the last qualifier is not LOAD, the data set name must be fully qualified and enclosed within single quotes on the command line.

Syntax:
CALL 'fullyqualfiedname(loadmodulename)' 'parameters'

Example:

CALL 'cmn.test.baso.lod(mytest1)' 'X,0,CCCC'

The above call function will call the program mytest1. We are also passing parameters to the program.
If the program uses input and output files the program will fail while opening the file as we have not allocated any datasets. This can be done using the ALLOCATE or ALLOC command prior to calling the program.

If the program needs a Input file to be associated with a ddname INPUT1, then following is how we execute the program

ALLOCATE DDNAME(INPUT1) DSN('sm107r.test.input') SHR
CALL 'cmn.test.baso.lod(mytest1)' 'X,0,CCCC'

 FROM HELP:
 FUNCTION                                                                 
   The CALL command loads and executes programs in executable form.       
                                                                          
 SYNTAX -                                                                 
                                                                          
          CALL   'dsname(member)' 'parm'                                  
                 CAPS/ASIS   NOENVB/PASSENVB                              

Defaults:
MEMBER - If no MEMBER is specified, TEMPNAME is used.     
CAPS   - the PARM parameter string is to be translated to uppercase.                                         
NOENVB - The REXX environment block address is not to be passed to the program in register 0.               
                                                            
Operands:
CAPS     The CAPS operand indicates that the parameter string
     'PARM' is to be translated to uppercase before the called program executes.       This is the default.                
                                                                       
ASIS     The ASIS operand indicates that the parameter string          
         'PARM' should not be translated to uppercase before           
         the called program executes.                                  
                                                                       
NOENVB   The NOENVB operand indicates that the REXX environment        
         block (ENVBLOCK) address is not to be passed to the called    
         program in register 0.  This is the default.                  
                                                                       
PASSENVB The PASSENVB operand indicates that the REXX environment      
         block (ENVBLOCK) address is to be passed to the called        
         program in register 0.                                        

dsname(member) - The name of a partitioned data set and the member which     
           is to be executed                                           

'parm'   - Specifies a parameter string (up to 100 characters)         
           that is passed to the program to be executed.               


No comments:

Post a Comment