Description of SMAPIREX

Download count: 13 this month, 1695 altogether.
Downloads for SMAPIREX:
  VMARC archive: v-3K

From Steve Shultz, IBM:

The SMAPI exec does much of the work of issuing a smapi call for you. It automatically does the following so you don't have to:

1) Connects to the smapi iucv request server

2) Fills in the first 8 common smapi parameters, everything up until the target

3) Optionally converts the call specific input data from EBCDIC

4) Sends the smapi request

5) Receives the smapi response

6) Parses out the return and reason codes, converting them to EBCDIC

7) Optionally converts the response data to EBCDIC

In the simplest case, this means a smapi call can be issued as follows:

myout = smapi('SSI_Query', mytarg)

parse var myout myrc myrsn respdata

In a more complex case, the smapi input and/or response data may contain elements that should not be converted to/from EBCDIC. For these cases you should issue the smapi call as follows:

myout = smapi('NTB', 'Image_Create_DM', mytarg, indata) /* don't translate either input or response data */

myout = smapi('NTO', 'Image_Activate', mytarg) /* don't translate response data */

myout = smapi('NTI', 'Image_CPU_Define', mytarg, indata) /* don't translate input data */

In all cases, you can still parse the response as:

parse var myout myrc myrsn respdata

In these cases, the input data and/or the response data must be constructed/parsed/translated by the caller.