AMT Help Files

DPS Work Flow

The flow of form requests at runtime.

AMT-COBOL for OS2200 uses the Psuedo-Conversational conversation model to send to and receive information from the Form as shown in the following flow diagram.

 

In AMT-COBOL the information in the DPS Working Storage buffer does not get automatically placed in the controls of the Form and vice versa. This task has to be performed by the Internet Information Server (IIS) when receiving a DPS Working Storage buffer from the Transaction Server and when sending user input back to the Transaction Server. Therefore each Form needs to contain a very small Cobol Program that will perform this task. This program has to be created in the code editor when creating the Form.

The Procedure Division of this Program only needs to have two code sections named 'WS-TO-FORM' and 'FORM-TO-WS'. The first section (WS-TO-FORM) will be performed by the IIS when output is sent to the form, the second section (FORM-TO-WS) is performed when user input is sent to the Transaction Server as shown for both in the flow diagram below.

 

WS-TO-FORM

The code in the section 'WS-TO-FORM' needs to copy the information from the fields in the Field Data Area of working storage to the Form Controls. For Form Controls with the same name as the FDA fields this is done automatically, for different named fields this is achieved with the Cobol statement:

     move <Data Field Name> to <ControlName>.

e.g.

   move s101-firstname to firstname.

FORM-TO-WS

In the section 'FORM-TO-WS' the information from the Form Controls needs to be copied to the fields in the Field Data Area of the working storage when they do not have the same name:

   move <ControlName> to <Data Field Name>.

e.g.

   move firstname to s101-firstname.