This chapter contains the following sections:
You create batch programs using the Program Painter, a tool that offers a shorthand method for developing applications. To fully define all divisions of your program except the Procedure Division, you simply enter APS keywords and their arguments. To help you create the Procedure Division more quickly, APS lets you write your database calls in simplified APS formats, saving you many lines of coding. You complete your Procedure Division by entering COBOL, COBOL/2, or S-COBOL structures. S-COBOL is an optional set of COBOL-like statements that simplify procedural coding. You enter all your program source code--including the APS keywords, database calls, and S-COBOL structures--on a blank Program Painter screen using its ISPF-like text editor.
You can also use the Program Painter to create batch report programs using the APS Report Writer structures. This chapter only discusses creating batch programs that generate to a flat file. For information about writing reports, see Create Reports with Report Writer.
Your application can consist entirely of batch programs, or you can mix batch programs with online programs in the same application. In addition, the programs of a single application can access different database and data communication (DB/DC) targets. For example, your batch programs can access VSAM files and IMS databases, while your online programs use CICS to access VSAM files and SQL databases. For all valid batch and online DB/DC target combinations, see Paint the Application Definition.
APS builds batch program source code from the following items:
|
Identification Division: |
Generated by APS, based on your Application Painter specifications |
|
Environment Division: |
Generated by APS keywords and arguments that you enter |
|
Data Division |
|
|
Data Division Database record definitions IMS database PCB mask Flags required by APS Data elements and flags for your procedural routines |
APS, based on your subschema APS, based on your subschema APS APS keywords and source code that you enter |
|
Data Division Data elements and flags for your procedural routines |
APS keywords and source code that you enter |
|
Procedure Division: Routines to initialize APS Working-Storage flags Procedural source code |
Generated by: APS APS keywords, database calls, and other procedural source code that you enter |
To specify procedural logic, you can use any combination of the following types of source code.
In addition, you can include in your programs externally-defined source code that further streamlines the process of developing applications. When you do so, you enter additional APS keywords to specify the program location where the source code belongs. Applications created in the Program Painter can use any of the following types of external source code:
|
External Source Code |
Data Set |
|---|---|
|
Global stubs, which are COBOL, COBOL/2, or S-COBOL paragraphs that all programs of your application can share |
APSPROG, your APS Project and Group data set for Program Painter programs and global stubs. You create stubs using the Program Painter; APS stores each stub in a separate file. For information on writing global stubs, see the "Stubs" topic in the APS Reference. |
|
COBOL copybooks containing data structures or other source code |
COPYLIB, your APS Project and Group data set for COBOL copybooks. |
|
Data structures created in the APS Data Structure Painter |
APSDATA, your APS Project and Group data set for data structures that you create using the Data Structure Painter. |
|
User-defined macros |
USERMACS, your APS Project and Group data set for user-defined Customization Facility macros. For information on writing user-defined macros, see the Customization Facility User's Guide. |
You enter all program keywords and source code in the following columns of the Program Painter screen, depending on which compiler you use.
|
Compiler |
Keyword Column Range |
Source Code Column Range |
|---|---|---|
|
OS/VS COBOL |
8 through 11 |
12 through 72 |
|
COBOL/2 |
8 through 11 |
12 through 80 |
To create a batch program using the Program Painter, follow these steps:
|
If application contains … |
Specify this DC target … |
|---|---|
|
Both batch and online programs |
Your online DC target. To identify the batch programs, enter *batch in the Screen field next to each batch program name and leave the I/O fields blank. |
|
Only batch programs |
Mvs. Additionally, leave each Screen field and I/O field blank. |
To target DB/2, leave this field blank or let default to VSAM. Then, before generating the application, specify db2 in the SQL field on the Generation Options screen.
If your application accesses multiple database targets, specify a target as follows:
|
If application accesses … |
Specify this DB target … |
|---|---|
|
Two DB targets, including VSAM |
The non-VSAM target, because APS always gives you access to the VSAM target. |
|
Two or more DB targets, not including VSAM |
Any of those DB targets. When you generate the programs, first generate just the programs of your specified DB target. Then change the DB target to the next target and generate just the programs of that next target. For example, if your application accesses both VSAM and IMS subschemas, generate your VSAM programs separately from your IMS programs. |
-KYWD- 12-*----20---*----30---*----40---*----50---*----
REM Comment text
continues onto the next line.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
/* Comment text
/* continues onto the next line.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
IO INPUT-CUSTFILE
ASSIGN TO EXTERNAL GARYDD
ORGANIZATION IS LINE SEQUENTIAL
IO OUTPUT-FILE
ASSIGN TO EXTERNAL GARYOUT
ORGANIZATION IS LINE SEQUENTIAL
Generated APS source:
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-CUSTFILE
ASSIGN TO EXTERNAL GARYDD
ORGANIZATION IS LINE SEQUENTIAL.
SELECT OUTPUT-FILE
ASSIGN TO EXTERNAL GARYOUT
ORGANIZATION IS LINE SEQUENTIAL.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
FD INPUT-CUSTFILE
RECORD CONTAINS 80 CHARACTERS.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
01 INPUT-REC.
05 INP-ACTION-CODE PIC X(1).
05 INP-CUSTOMER-NO PIC X(6).
05 INP-CUSTOMER-NAME PIC X(20).
05 INP-CUSTOMER-ADDR PIC X(20).
05 INP-CUSTOMER-CITY PIC X(20).
05 INP-CUSTOMER-ZIP PIC X(9).
05 FILLER PIC X(4).
-KYWD- 12-*----20---*----30---*----40---*----50---*----
REC INPUT-REC
INP-ACTION-CODE X1
INP-CUSTOMER-NO X6
INP-CUSTOMER-NAME X20
INP-CUSTOMER-ADDR X20
INP-CUSTOMER-CITY X20
INP-CUSTOMER-ZIP X9
FILLER X4
Generated APS source:
01 INPUT-REC.
05 INP-ACTION-CODE PIC X(1).
05 INP-CUSTOMER-NO PIC X(6).
05 INP-CUSTOMER-NAME PIC X(20).
05 INP-CUSTOMER-ADDR PIC X(20).
05 INP-CUSTOMER-CITY PIC X(20).
05 INP-CUSTOMER-ZIP PIC X(9).
05 FILLER PIC X(4).
-KYWD- 12-*----20---*----30---*----40---*----50---*---- DS INREC
-KYWD- 12-*----20---*----30---*----40---*----50---*----
FD OUTPUT-FILE
RECORD CONTAINS 80 CHARACTERS.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
01 OUTPUT-REC.
05 OUTPUT-STATUS PIC X(2).
05 OUTPUT-CUSTOMER-NO PIC X(6).
05 OUTPUT-CUSTOMER-NAME PIC X(20).
05 OUTPUT-CUSTOMER-ADDR PIC X(20).
05 OUTPUT-CUSTOMER-CITY PIC X(20).
05 OUTPUT-CUSTOMER-ZIP PIC X(9).
05 OUTPUT-FILLER PIC X(3).
-KYWD- 12-*----20---*----30---*----40---*----50---*----
SD SORT-FILE
RECORD CONTAINS 80 CHARACTERS
DATA RECORD IS SORT-RECORD.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
01 SORT-RECORD.
05 SORT-CUSTOMER-NAME PIC X(8).
05 FILLER PIC X(72).
-KYWD- 12-*----20---*----30---*----40---*----50---*----
01 WS-STRUCT-IN-COBOL-FORMAT.
05 MY-WS-FIELD-1 PIC X(8).
05 MY-WS-FIELD-2.
10 MY-WS-FIELD-3 PIC X(8).
10 MY-WS-FIELD-4 PIC X(3).
Generated APS source:
01 WS-STRUCT-IN-COBOL-FORMAT.
05 MY-WS-FIELD-1 PIC X(8).
05 MY-WS-FIELD-2.
10 MY-WS-FIELD-3 PIC X(8).
10 MY-WS-FIELD-4 PIC X(3).
-KYWD- 12-*----20---*----30---*----40---*----50---*----
REC WS-STRUCT-IN-DSPAINTER-FORMAT
MY-WS-FIELD-1 X8
MY-WS-FIELD-2
MY-WS-FIELD-3 X8
MY-WS-FIELD-3 X3
Generated APS source:
01 WS-STRUCT-IN-DSPAINTER-FORMAT.
05 MY-WS-FIELD-1 PIC X(8).
05 MY-WS-FIELD-2.
10 MY-WS-FIELD-3 PIC X(8).
10 MY-WS-FIELD-4 PIC X(3).
-KYWD- 12-*----20---*----30---*----40---*----50---*---- SYWS % INCLUDE COPYLIB (MY-COPYBOOK)
-KYWD- 12-*----20---*----30---*----40---*----50---*---- 01 WS-COPYBOOK-FLD COPY MY-COPYBOOK
-KYWD- 12-*----20---*----30---*----40---*----50---*---- DS DATARECS
-KYWD- 12-*----20---*----30---*----40---*----50---*----
SQL DECLARE DSN8.TDEPT TABLE
... (DEPTNO CHAR(3) NOT NULL,
... DEPTNAME CHAR(36) NOT NULL,
... MGRNO CHAR(3) NOT NULL,
... ADMRDEPT CHAR(3) NOT NULL)
-KYWD- 12-*----20---*----30---*----40---*----50---*---- ++ PANWSREC
Note: To include a copybook in the Linkage Section, substitute the SYWS keyword, as shown in step 22, with the SYLT or SYLK keyword.
|
Program Type |
Procedure Division Keyword |
|---|---|
|
Calling or non-calling |
NTRY or PROC; both keywords generate a PROCEDURE DIVISION statement. |
|
Called |
PROC with optional USING clause; generates a PROCEDURE DIVISION USING statement, enabling the program to receive data items from a calling program' s CALL statement. |
|
Any IMS program |
NTRY. PROC is invalid. To specify arguments for a PROCEDURE DIVISION USING clause, specify them in a TP-LINKAGE call that you code in the Linkage Section. |
For example, enter the PROC keyword with the USING clause data items TOTAL, W-BALANCE, and CHARGERECORD to generate a PROCEDURE DIVISION USING statement in a called program, as shown below.
-KYWD- 12-*----20---*----30---*----40---*----50---*---- PROC TOTAL W-BALANCE CHARGERECORD
Generated APS source:
PROCEDURE DIVISION USING TOTAL W-BALANCE CHARGERECORD.
For example:
-KYWD- 12-*----20---*----30---*----40---*----50---*----
PROC
OPEN INPUT INPUT-CUSTFILE
... OUTPUT OUTPUT-FILE
REPEAT
READ INPUT-CUSTFILE
WS-CUST-NO = INP-CUSTOMER-NO
UNTIL AT END ON INPUT-CUSTFILE
EVALUATE INP-ACTION-CODE
WHEN 'Q'
PERFORM QUERY-LOGIC
WHEN 'U'
PERFORM UPDATE-LOGIC
WHEN 'D'
PERFORM DELETE-LOGIC
CLOSE INPUT-CUSTFILE
... OUTPUT-FILE
PARA QUERY-LOGIC
DB-OBTAIN REC CUSTOMER-REC
... WHERE CM_CUSTOMER_NO = #WS-CUST-NO
IF OK-ON-REC
OUTPUT-STATUS = 'SQ'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UQ'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
.
.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
DPAR section-1-name SECTION declarative-sentence
DPAR para-1-name
/* para-1-name source code
.
.
.
DPAR section-2-name SECTION declarative-sentence
DPAR para-2-name
/* para-2-name source code
.
.
Generated APS source:
DECLARATIVES. section-1-name SECTION. declarative-sentence para-1-name. /* para-1-name source code . . . section-2-name SECTION. declarative-sentence para-2-name. /* para-2-name source code . . END DECLARATIVES.
-KYWD- 12-*----20---*----30---*----40---*----50---*----
DECL declarative-statement
declarative-statement
Generated APS source:
DECLARATIVES. declarative-statement declarative-statement END DECLARATIVES.
|
Program Location |
Comment Format |
|---|---|
|
Anywhere |
-KYWD- 12-*----20---*----30---*----40---*-- /* comment text /* comment text |
|
Procedure Division |
-KYWD- 12-*----20---*----30---*----40---*--
/* comment text
program source code /* comment text
|
For example:
-KYWD- 12-*----20---*----30---*----40---*----50---*----
SYM1
/* MACRO VARIABLE TO APPEAR AT BEGINNING OF PROGRAM,
/* AFTER MACRO LIBRARY THAT I INCLUDE AT BEGINNING OF
/* PROGRAM.
% &REC-LEN = 80
SYFD
/* MACRO CALL TO APPEAR IN FILE SECTION, AFTER MACRO
/* LIBRARY THAT I INCLUDE AT BEGINNING OF FILE SECTION.
% $INPUTFILE-REC-DESCRIP( 'INPUT-REC')
|
Component |
Project\Group Data Set |
|---|---|
|
Database record definitions |
DDISYMB and COPYLIB |
|
Data structures included from copylibs |
COPYLIB |
|
Data structures included from the Data Structure Painter |
APSDATA |
|
User-defined macros |
USERMACS |
To view the source in Program Painter format again, enter reset or unconv.
When modifying your program, do not modify the generated source code; modify only your Program Painter source code.
Below is a complete program illustrating many APS batch programming features.
Program Painter source:
-KYWD- 12-*----20---*----30---*----40---*----50---*----
IO INPUT-CUSTFILE
ASSIGN TO GARYDD
ORGANIZATION IS LINE SEQUENTIAL
IO OUTPUT-FILE
ASSIGN TO GARYOUT
ORGANIZATION IS LINE SEQUENTIAL
FD INPUT-CUSTFILE
RECORD CONTAINS 80 CHARACTERS.
01 INPUT-REC.
05 INP-ACTION-CODE PIC X(1).
05 INP-CUSTOMER-NO PIC X(6).
05 INP-CUSTOMER-NAME PIC X(20).
05 INP-CUSTOMER-ADDR PIC X(20).
05 INP-CUSTOMER-CITY PIC X(20).
05 INP-CUSTOMER-ZIP PIC X(9).
05 FILLER PIC X(4).
FD OUTPUT-CUSTFILE
RECORD CONTAINS 80 CHARACTERS.
01 OUTPUT-REC.
05 OUTPUT-STATUS PIC X(2).
05 OUTPUT-CUSTOMER-NO PIC X(6).
05 OUTPUT-CUSTOMER-NAME PIC X(20).
05 OUTPUT-CUSTOMER-ADDR PIC X(20).
05 OUTPUT-CUSTOMER-CITY PIC X(20).
05 OUTPUT-CUSTOMER-ZIP PIC X(9).
05 OUTPUT-FILLER PIC X(3).
PROC
OPEN INPUT INPUT-CUSTFILE
... OUTPUT OUTPUT-FILE
REPEAT
READ INPUT-CUSTFILE
WS-CUST-NO = INP-CUSTOMER-NO
UNTIL AT END ON INPUT-CUSTFILE
EVALUATE INP-ACTION-CODE
WHEN 'Q'
PERFORM QUERY-LOGIC
WHEN 'U'
PERFORM UPDATE-LOGIC
WHEN 'D'
PERFORM DELETE-LOGIC
CLOSE INPUT-CUSTFILE
... OUTPUT-FILE
PARA QUERY-LOGIC
DB-OBTAIN REC CUSTOMER-REC
... WHERE CM_CUSTOMER_NO = #WS-CUST-NO
IF OK-ON-REC
OUTPUT-STATUS = 'SQ'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UQ'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
PARA UPDATE-LOGIC
PERFORM MOVE-INPUT-TO-COPYLIB
DB-MODIFY REC CUSTOMER-REC
... WHERE CM_CUSTOMER_NO = #WS-CUST-NO
IF OK-ON-REC
OUTPUT-STATUS = 'SM'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UM'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
PARA DELETE-LOGIC
DB-ERASE REC CUSTOMER-REC
... WHERE CM_CUSTOMER_NO = #WS-CUST-NO
IF OK-ON-REC
OUTPUT-STATUS = 'SE'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UE'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
PARA ADD-LOGIC
PERFORM MOVE-INPUT-TO-COPYLIB
DB-STORE REC CUSTOMER-REC
... WHERE CM_CUSTOMER_NO = #WS-CUST-NO
IF OK-ON-REC
OUTPUT-STATUS = 'SS'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'BS'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
PARA MOVE-INPUT-TO-OUTPUT
OUTPUT-STATUS = OUTPUT-STATUS
OUTPUT-CUSTOMER-NO = INP-CUSTOMER-NO
OUTPUT-CUSTOMER-NAME = INP-CUSTOMER-NAME
OUTPUT-CUSTOMER-ADDR = INP-CUSTOMER-ADDR
OUTPUT-CUSTOMER-CITY = INP-CUSTOMER-CITY
OUTPUT-CUSTOMER-ZIP = INP-CUSTOMER-ZIP
PARA MOVE-COPYLIB-TO-OUTPUT
OUTPUT-CUSTOMER-NO = CM-CUSTOMER-NO
OUTPUT-CUSTOMER-NAME = CM-CUSTOMER-NAME
OUTPUT-CUSTOMER-ADDR = CM-CUSTOMER-ADDR
OUTPUT-CUSTOMER-CITY = CM-CUSTOMER-CITY
OUTPUT-CUSTOMER-ZIP = CM-CUSTOMER-ZIP
PARA MOVE-INPUT-TO-COPYLIB
CM-CUSTOMER-NO = INP-CUSTOMER-NO
CM-CUSTOMER-NAME = INP-CUSTOMER-NAME
CM-CUSTOMER-ADDR = INP-CUSTOMER-ADDR
CM-CUSTOMER-CITY = INP-CUSTOMER-CITY
CM-CUSTOMER-ZIP = INP-CUSTOMER-ZIP
PARA WRITE-MSGOUT
WRITE OUTPUT-REC
WS
01 THEFLDS.
05 WS-CUST-NO PIC X(6).
Generated APS source:
% &AP-GEN-VER = 2200
% &AP-PGM-ID = "SAMPLPGM"
% &AP-MAIN-PROGRAM- = "NO"
% &AP-GEN-DC-TARGET = "MVS"
% &AP-GEN-DB-TARGET = "VSAM"
% &AP-GEN-USER-HELP = "NO"
% &AP-PROC-DIV-KYWD-SEEN = 1
% &AP-FILE-CONTROL-SEEN = 1
% &AP-SUBSCHEMA = "SAMPLSUB"
% &AP-APPLICATION-ID = "JOHND"
% &AP-GEN-DATE = "930407"
% &AP-GEN-TIME = "07244461"
%* --- SUBSCHEMA / PSB FROM APPLICATION DEFINITION ---
$DB-SUBSCHEMA("SAMPLSUB")
IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLPGM.
AUTHOR. JOHND.
DATE-WRITTEN. 93/04/07.
DATE-COMPILED. &COMPILETIME.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. &SYSTEM.
OBJECT-COMPUTER. &SYSTEM.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-CUSTFILE
ASSIGN GARYDD
ORGANIZATION IS LINE SEQUENTIAL.
SELECT OUTPUT-FILE
ASSIGN GARYOUT
ORGANIZATION IS LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD INPUT-CUSTFILE
RECORD CONTAINS 80 CHARACTERS.
01 INPUT-REC.
05 INP-ACTION-CODE PIC X(1).
05 INP-CUSTOMER-NO PIC X(6).
05 INP-CUSTOMER-NAME PIC X(20).
05 INP-CUSTOMER-ADDR PIC X(20).
05 INP-CUSTOMER-CITY PIC X(20).
05 INP-CUSTOMER-ZIP PIC X(9).
05 FILLER PIC X(4).
FD OUTPUT-FILE
RECORD CONTAINS 80 CHARACTERS.
01 OUTPUT-REC
05 OUTPUT-STATUS PIC X(2).
05 OUTPUT-CUSTOMER-NO PIC X(6).
05 OUTPUT-CUSTOMER-NAME PIC X(20).
05 OUTPUT-CUSTOMER-ADDR PIC X(20).
05 OUTPUT-CUSTOMER-CITY PIC X(20).
05 OUTPUT-CUSTOMER-ZIP PIC X(9).
05 OUTPUT-FILLER PIC X(3).
WORKING-STORAGE SECTION.
$TP-WS-MARKER
01 THEFLDS.
05 WS-CUST-NO PIC X(6).
01 TEXT-MSG PIC X(30)
VALUE &SQ+PLEASE ENTER NEXT TRANSID&SQ.
PROCEDURE DIVISION.
OPEN INPUT INPUT-CUSTFILE
... OUTPUT OUTPUT-FILE
REPEAT
READ INPUT-CUSTFILE
WS-CUST-NO = INP-CUSTOMER-NO
UNTIL AT END ON INPUT-CUSTFILE
EVALUATE INP-ACTION-CODE
WHEN 'Q'
PERFORM QUERY-LOGIC
WHEN 'U'
PERFORM UPDATE-LOGIC
WHEN 'D'
PERFORM DELETE-LOGIC
CLOSE INPUT-CUSTFILE
... OUTPUT-FILE
QUERY-LOGIC
$DB-OBTAIN ( "REC CUSTOMER-REC WHERE CM_CUSTOMER_NO = ",
%... "#WS-CUST-NO" )
IF OK-ON-REC
OUTPUT-STATUS = 'SQ'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UQ'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
UPDATE-LOGIC
PERFORM MOVE-INPUT-TO-COPYLIB
$DB-MODIFY ( "REC CUSTOMER-REC WHERE CM_CUSTOMER_NO = ",
%... "#WS-CUST-NO" )
IF OK-ON-REC
OUTPUT-STATUS = 'SM'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UM'
PERFORM MOVE-COPYLIB-TO-OUTPUT
PERFORM WRITE-MSGOUT
DELETE-LOGIC
$DB-ERASE ( "REC CUSTOMER-REC WHERE CM_CUSTOMER_NO = ",
%... "#WS-CUST-NO" )
IF OK-ON-REC
OUTPUT-STATUS = 'SE'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'UE'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
ADD-LOGIC
PERFORM MOVE-INPUT-TO-COPYLIB
$DB-STORE ( "REC CUSTOMER-REC WHERE CM_CUSTOMER_NO = ",
%... "#WS-CUST-NO" )
IF OK-ON-REC
OUTPUT-STATUS = 'SS'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
ELSE
OUTPUT-STATUS = 'BS'
PERFORM MOVE-INPUT-TO-OUTPUT
PERFORM WRITE-MSGOUT
MOVE-INPUT-TO-OUTPUT
OUTPUT-STATUS = OUTPUT-STATUS
OUTPUT-CUSTOMER-NO = INP-CUSTOMER-NO
OUTPUT-CUSTOMER-NAME = INP-CUSTOMER-NAME
OUTPUT-CUSTOMER-ADDR = INP-CUSTOMER-ADDR
OUTPUT-CUSTOMER-CITY = INP-CUSTOMER-CITY
OUTPUT-CUSTOMER-ZIP = INP-CUSTOMER-ZIP
MOVE-COPYLIB-TO-OUTPUT
OUTPUT-CUSTOMER-NO = CM-CUSTOMER-NO
OUTPUT-CUSTOMER-NAME = CM-CUSTOMER-NAME
OUTPUT-CUSTOMER-ADDR = CM-CUSTOMER-ADDR
OUTPUT-CUSTOMER-CITY = CM-CUSTOMER-CITY
OUTPUT-CUSTOMER-ZIP = CM-CUSTOMER-ZIP
MOVE-INPUT-TO-COPYLIB
CM-CUSTOMER-NO = INP-CUSTOMER-NO
CM-CUSTOMER-NAME = INP-CUSTOMER-NAME
CM-CUSTOMER-ADDR = INP-CUSTOMER-ADDR
CM-CUSTOMER-CITY = INP-CUSTOMER-CITY
CM-CUSTOMER-ZIP = INP-CUSTOMER-ZIP
WRITE-MSGOUT
WRITE OUTPUT-REC
Copyright © 2002 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.