./SPA command

Use the ./SPA command to define the contents of a scratchpad area (SPA) for conversational processing. IMS Batch Terminal Simulator provides an initialized scratchpad area to the first processing program of the conversation and is initialized with transaction code and binary zeros. If the execution is to begin at a point other than the start of the conversation, and a nonzero SPA is required, then the SPA contents can be provided through the ./SPA command.

Usage note

The ./SPA command is used only when the program is scheduled.

The ./SPA command can continue in the same manner as other simulator commands and simulator statements. The end-of-message indicator defined by the EOM keyword on the ./D command must be used in place of the default value ($). The end-of-message indicator must be hexadecimal if an ./R IP=HEX command precedes the ./SPA command.

Format

 ./SPA ttttttttdata$

Keywords

tttttttt
Is the eight-character transaction code and must begin in column 7 of the ./SPA command. It is the transaction code of the transaction to be passed to this scratchpad area on its initial GU call. tttttttt must be hexadecimal if an ./R command precedes the ./SPA command.
data
Is the data to be inserted following the transaction code in the scratchpad area. Data must be hexadecimal if an ./R command precedes the ./SPA command.
$
Indicates end of text.

Examples

Example 1 for ./SPA command
You need a data field in the scratchpad area, and the desired SPA is:
RENAME JANE DOE SMITH

Then your input stream might include:

 ./T TC=RENAME MBR=NAMER SPA=24
 ./D EOM=#
 ./SPA RENAME␢␢JANE␢␢DOE␢␢SMITH␢␢#
Example 2 for ./SPA command
You are testing conversational processing and the program module that processes the message before you is not working yet. Assume that the SPA, when you get it, looks like:
YOURTC 0017E5999+ ␢␢␢␢
Then your input stream might include:
 ./T TC=YOURTC MBR=YOURPGM SPA=20
 ./R IP=HEX        Hex spa definition to follow
 ./SPA E8D6E4D9E3C340400017E5999C404040404040405B
 ./*   Y O U R T C
 ./R IP=CHAR       Readable input again
 YOURTC INPUT MESSAGE DATA $
In this case, IMS Batch Terminal Simulator queues the SPA defined by the ./SPA command awaiting a YOURTC input message. When IMS Batch Terminal Simulator reads the YOURTC message:
  • It schedules YOURPGM to process the YOURTC transaction.
  • It returns the queued SPA in the I/O area when YOURPGM issues a GU by using its I/O PCB.
  • It returns YOURTC INPUT MESSAGE DATA when YOURPGM issues a GN by using its I/O PCB.
Example 3 for ./SPA command
When a conversational application on REXX uses SPA, SPA data must be defined by using MAPDEF. If SPA data defined by MAPDEF is of the variable-data type or the packed-decimal-data type, you must initialize the SPA area for each data type by using the ./SPA command.

SPA is defined as follows in application programs:

spa_map = "spa.txn C 8 : spa.pack P.2 6:",
          "spa.var V 5: spa.zone Z.2 6 : spa.bnr B 1 :"
 
 Address REXXIMS "MAPDEF spa spa_map REPLACE "

Then your input stream might include:

  ./T TC=TRXPTEST LANG=ASM MBR=REXXP010 SPA=100
  ./R IP=HEX
  ./SPA E3D9E7D7E3C5E2E300000000000C00050000000000F0F0F0F0F0F001
  ./R IP=CHAR
  TRXPTEST DATA $