Chapter 2. Introducing File Manager 87
Figure 2-96 Results of PF10 RunTemp
2.2.3 How to process COPY REPLACING statements
For applications that have source programs containing the construct shown in Example 2-23,
File Manager has a feature that enables the processing of COPY REPLACING statements.
Example 2-23 Source code with a COPY REPLACING statement
01 CANCEL-IN-RECORD.
COPY COPYSMP1 REPLACING ==:CUSTIO:== BY == CANCEL-IN ==.
In this example, we use File Manager to create a template with the substituted values in the
following manner:
1. Review the source statements in your application program to ascertain the value of the
pseudo-text and the string that should be substituted.
2. Access File Manager in your ISPF session.
3. Go to option 7 (Templates).
The Template Workbench panel is displayed.
4. Enter the copybook data set name and member.
5. Enter the template data set name and member.
6. Select the Options pull-down.
7. Type 6 to adjust your File Manager processing options, as shown in Figure 2-97, and
press Enter.
88 Using IBM Application Development Tools for z/OS and OS/390
Figure 2-97 Selecting options before creating a template
8. On the Set Processing Options panel, adjust the COBOL Replacing Options by doing the
following:
a. Enter the From string (the pseudo-text) that is found in the copybook.
b. Enter the To string (the string) that should be placed in the source program at compile
time.
Your panel should look similar to the one in Figure 2-98.
Figure 2-98 COBOL copy replacing options in File Manager
In this case, the pseudo-text ==:CUSTIO:== is replaced by the string ==CANCEL-IN==.
Tip: You must include the equal signs (delimiters) for the File Manager processing to work.
If you do not, the compilation of the copybook will fail with a return code of 8.
Get Using IBM Application Development Tools for z/OS and OS/390 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.