In a recent note, Chris Mason said:

> Date:         Thu, 14 Dec 2006 05:52:00 +0100
> 
> http://publibz.boulder.ibm.com/bookmgr/pictures/iea2a660.p1z.gif
> <quote>
> 
> For a good example of how your primary mode programs can pass parameters,
> consider the way the system uses a register to pass information in the PARM
> field of an EXEC statement to your program. Unlike the parameter list
> produced for an EXEC statement, a general parameter list can have multiple
> parameters, there is no system-imposed limitation on the length of any
> parameter, and no parameter has a system-defined format. Lengths and formats
> of parameters are defined by the called service.
> 
> </quote>
> 
> "Lengths and formats of parameters are defined by the called service." would
> make more sense if it were replaced by "In general, lengths and formats of
> parameters are defined by the called service. However, for the case of the
> PARM field of an EXEC statement, it is clearly the *calling* service." The
> "asterisked" word would be in italics.
> 
Not really.  I'll agree with the manual here.  The called service
always defines the lengths and formats.  The EXEC statement or the
programmer may pass parameters that don't conform to the definition
by the called service, in which case the called service will properly
report an error.  A couple examples (using TSO for convenience rather
than JCL, but the interface is identical, even to the 100-character
limit):

 READY 
call *(GIMSMP) 'foobar'
 PAGE 0001  - NOW SET TO        ZONE          DATE 12/14/06  TIME 06:46:07  
SMP/E 33.18   SMPOUT   OUTPUT
  
 GIM42401I    THE FOLLOWING PARAMETERS WERE SPECIFIED ON THE EXEC STATEMENT FOR 
GIMSMP: 'FOOBAR'.
 GIM20307T ** THERE IS A SYNTAX ERROR IN THE EXEC PARM STATEMENT AT CHARACTER 
01.

... the format of the passed parameter did not meet the requirements
of the called service, which reported an error.

 READY 
call *(CSNBOWH) 'wombat'
 IKJ56641I CSNBOWH  ENDED DUE TO ERROR+
 READY 

... CSNBOWH defines a requirement for multiple parameters.  Neither
CALL nor EXEC can define it otherwise, but when either passes only
a single parameter, CSNBOWH fails with an error.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to