If your transaction makes it through its input audits and the attendant hazards, the processing specific to mapped input is complete. The next step, frequently, is to prepare and send the transaction output. In general, if the output is to be mapped, you follow the steps outlined in Sending BMS mapped output. However, the acquisition of storage for building the map may be affected by the input mapping you have already done. If the output and input maps are different, but in the same map set or in map sets defined to overlay one another, you have already done the storage acquisition during your input mapping process. If your output and input maps overlay one another, you need to ensure that you save any map input you still need and clear the output structure to nulls before you start building the output map. If this is awkward, you may want to define the maps so that they do not overlay one another. (See BASE and STORAGE options for your choices in this regard.)
Your transaction may also call for using the same map for output as input. This is routine in code that handles input errors, as we have already seen, and also in simple transactions like "quick update". One-screen data-entry transactions are another common example.
When you are sending new data with a map already on the screen, you can reduce transmission with the DATAONLY option, and you may need only the SEND CONTROL command. See Merging the symbolic and physical maps for a discussion of these options.
For the "quick update" transaction, however, we need to fill in the message field with our "go" response (and update the file with the charge to finish our processing):
MOVE 'CURRENT CHARGE OKAY; ENTER NEXT' TO MSGO
ADD CHGI TO ACCTFILE-CUR-CHGS
EXEC CICS REWRITE FILE('ACCT') FROM (ACCTFILE-RECORD)....
We also need to erase the input fields, so that the screen is ready for the next input. We have to do this both on the screen (the ERASEAUP option erases all unprotected fields) and in the output structure (because the output subfield overlays the input subfield and the input data is still there).
MOVE LOW-VALUES TO ACCTNOO CHGO.
EXEC CICS SEND MAP('QUPMAP') MAPSET('QUPSET') FROM(QUPMAPO)
DATAONLY ERASEAUP END-EXEC.
Finally, we can return control to CICS®, specifying that the same transaction is to be executed for the next input.
EXEC CICS RETURN TRANSID('QUPD') END-EXEC.
[[ Contents Previous Page | Next Page Index ]]