After you run an intermediate test and are satisfied with the results, you can begin defining the working storage record and supplying the logic for your program.
A working storage record holds temporary and intermediate data values that a program uses while it runs. Your sample program requires a working storage record containing four nonshared data items. Specifying that data items are nonshared means that they are not part of other record parts and cannot be used outside the context of the record they are used in.
You named the working storage record for this program when you defined the program specifications in the Program Editor. The working storage record is represented on the structure diagram by the record symbol and the name CUST-LIST-WS to the right of the symbol. The question mark (?) symbol is removed after you define the record.
To begin defining the working storage record, do the following:
The New Part Package/Application is displayed.
The new part is created and the Record Editor is displayed.
You have already named CUST-LIST-WS as a working storage record. Now, you need to define the nonshared data items for CUST-LIST-WS.
To define the nonshared data items for CUST-LIST-WS, perform the following steps:
A new row is inserted and the cursor is displayed in the Name field.
Tip: | Choices on the context menus can make defining records faster. To display the context menu, place the mouse pointer in the data items list and click mouse button 2. For more information on defining records, see the online help. |
The cursor moves to the Occurs field.
The cursor moves to the Type field.
The default type of Char remains in this field and the cursor is displayed in the Length field.
Now add three more data items by selecting Edit>Insert
After three times. Then, enter the values from the following
table into the three new data items.
Name | Occurs | Length |
---|---|---|
cusname-ws | 10 | 20 |
cuscontact-ws | 10 | 20 |
cusphone-ws | 10 | 12 |
When you've entered all the data items for your working storage record, it should look like the record shown in Figure 73.
The record is saved.