CPPUPDTE (IPOUPDTE) ServerPac Program ______________________________________ CPPUPDTE is a program that enables you to search for a string across all the members of a PDS and replace that string with another string. CPPUPDTE is loaded into the LOADLIB data set (hlq.order_number.LOADLIB) during ServerPac installation. It also has an alias name of IPOUPDTE because the job is actually the same job that was shipped with CBIPO. The following information about how to use CPPUPDTE is an excerpt from the "CBIPO Design Reference" (C) Copyright IBM Corp. 1983,1991. All references to IPOUPDTE are equally applicable to the CPPUPDTE program provided with ServerPac. Important: For CPPUPDTE and IPOUPDTE to work, each PDS to be searched MUST contain a member named $$$COIBM. This documentation describes the following topics: - Introduction - Method of Operation - IPOUPDTE Control Statements - Basic Control Statement - Extended Contol Statement - The END Control Statement - The Comment Control Statement - Continuations and Commands - Control Statement Input from the System Console - The No Update/Resume Update Facility - Execution Modes - JCL for IPOUPDTE - One More Example Using IPOUPDTE - IPOUPDTE Messages - IPOUPDTE Return Codes Introduction ____________ IPOUPDTE is an update program that allows you to change fields in JCL and control statements in MVS Custom-Built IPO-provided libraries. The program is used extensively in the Custom-Built IPO batch installation processes and is the primary means by which you can modify these and other Custom-Built IPO jobs to implement your system design. Each of the Custom-Built IPO batch installation guides provides a brief introduction to IPOUPDTE so that you can change the supplied IPOUPDTE control statements and run the jobs. The description here is more comprehensive. It tells how the program works, what all of its functional capabilities are, and how to set up the JCL for an IPOUPDTE job. Complete lists of messages and return codes from IPOUPDTE are also given. Note: Under most circumstances, you will not need to know this information to run the IPOUPDTE jobs in the CBIPO batch installation processes. The CBIPO batch installation guides should be adequate for running the installation process for your CBIPO feature. This appendix is provided as a reference for people who run into unusual difficulties in the installation processes or who want to make extensive modifications to the CBIPO-provided jobstreams. Method of Operation ___________________ IPOUPDTE is a search-and-replace program. It scans a member of a PDS, all the members of a PDS, or all the members of a list of PDSs, and it conditionally replaces in place parts of the input records. Only CBIPO-provided libraries are eligible for updating by IPOUPDTE. The data to be replaced, called STRING1, and the replacement data, called STRING2, are defined by control statements in a SYSIN data set. An optional third search argument, called STRING3, enables you to make the replacement only when STRING3 is present in the input record. The operation is as follows: 1. A data record is read into the input buffer and then copied into the output buffer. 2. The optional STRING3 on a control statement causes IPOUPDTE to search the input buffer for STRING3. a. If STRING3 is found, the output buffer is searched for STRING1 and, if found, STRING2 replaces STRING1 in the output buffer. b. If there is no STRING3, processing is the same as when STRING3 is specified and found: The output buffer is searched for STRING1 and, if found, STRING2 replaces STRING1. Replacement occurs only in the output buffer. All the potential updates (that is, all the STRING1/STRING2s you specify) are processed against one input record before processing the next record. Updates occur in the same sequence in which they are specified in the control statements, so the result of one update can be changed by later updates. Figure 1 provides four examples of IPOUPDTE processing. In each case the STRING1, STRING2, and STRING3 on a line go together, and both of the sets of STRING1/2/3 operate on each of the four input records before proceeding to the next input record. +--------------------------------------------------------------------+ | Figure 1. Examples of IPOUPDTE processing. | +--------------------------------------------------------------------+ | STRING1 | STRING2 | STRING3 | INPUT RECORDS | UPDATED RECORDS | +--------------------------------------------------------------------+ | | | | | | | ONE | AAA | (None) | ONE ONE ZZZ | AAA AAA ZZZ | | TWO | ONE | (None) | ONE TWO | AAA ONE | | | | | TWO ONE ZZZ | ONE AAA ZZZ | | | | | TWO TWO | ONE ONE | +--------------------------------------------------------------------+ | | | | | | | ONE | AAA | (None) | ONE ONE ZZZ | AAA AAA ZZZ | | TWO | ONE | ZZZ | ONE TWO | AAA TWO | | | | | TWO ONE ZZZ | ONE AAA ZZZ | | | | | TWO TWO | TWO TWO | +--------------------------------------------------------------------+ | | | | | | | TWO | ONE | ZZZ | ONE ONE ZZZ | AAA AAA ZZZ | | ONE | AAA | (None) | ONE TWO | AAA TWO | | | | | TWO ONE ZZZ | AAA AAA ZZZ | | | | | TWO TWO | TWO TWO | +--------------------------------------------------------------------+ | | | | | | | ONE | AAA | (None) | ONE ONE ZZZ | AAA AAA TWO | | ZZZ | TWO | ONE | ONE TWO | AAA TWO | | | | | TWO ONE ZZZ | TWO AAA TWO | | | | | TWO TWO | TWO TWO | +--------------------------------------------------------------------+ Other rules regarding string replacement are as follows: 1. The string to be replaced, STRING1, must be totally contained in positions 1 through 71 of an input record. Thus, the continuation position, position 72, and the sequence number field, positions 73 through 80, are not affected by any updates. 2. To be eligible for replacement, STRING1 must be a "word," not merely a string of characters imbedded within a "word." A "word" to IPOUPDTE is any string of characters bounded on both ends by any of several special delimiting characters. It does not have to be an English word in the ordinary sense. For STRING1 to be a word, it must have one of the following characters to its left and one to its right: ' , . / < > ? " : ; ^ + _ ( ) * % | = and blank The only exceptions to this statement are: * When STRING1 starts at the beginning of the input record or ends in the last position (71) of the input record * When the two characters '.V' or '/V' occur in an input record. The 'V' is considered part of the delimiter, not of the word, and so is not eligible for replacement. NOTE: The special handling of '.V' allows IPOUPDTE to update a VOLSER in CBIPO-format catalog names at the same time most other references to the VOLSER are updated. Figure 21 demonstrates how IPOUPDTE handles the '.V' special case. +--------------------------------------------------------------------+ | Figure 2. Examples of IPOUPDTE processing. | +--------------------------------------------------------------------+ | STRING1 | STRING2 | STRING3 | INPUT RECORDS | UPDATED RECORDS | +--------------------------------------------------------------------+ | | | | | | | MVSCAT | MYPAK1 | (None) | CATALOG. | CATALOG. | | | | | MVSICF1. | MVSICF1. | | | | | VMVSCAT | VMYPAK1 | +--------------------------------------------------------------------+ | | | | | | | MVSCAT | MYPAK1 | (None) | CATALOG. | CATALOG. | | | | | MVSICF1. | MVSICF1. | | | | | ZMVSCAT | ZMVSCAT | +--------------------------------------------------------------------+ In the second section of the above example, where '.Z' has been specified in the input instead of '.V', no special processing is done; the VOLSER MVSCAT in this last record is not changed by IPOUPDTE. The special handling of '/V' allows IPOUPDTE to update a VOLSER in CBIPO-format operator JCL at the same time most other references to the VOLSER are updated. Figure 3 demonstrates how IPOUPDTE handles the '/V' special case. +--------------------------------------------------------------------+ | Figure 3. Examples of IPOUPDTE processing. | +--------------------------------------------------------------------+ | STRING1 | STRING2 | STRING3 | INPUT RECORDS | UPDATED RECORDS | +--------------------------------------------------------------------+ | | | | | | | MVSCAT | MYPAK1 | (None) | //VMVSCAT JOB | //VMYPAK1 JOB | +--------------------------------------------------------------------+ | | | | | | | MVSCAT | MYPAK1 | (None) | //ZMVSCAT JOB | //ZMVSCAT JOB | +--------------------------------------------------------------------+ In the second section of the above example, where '/Z' has been specified in the input instead of '/V', no special processing is done; the VOLSER MVSCAT in this last record is not changed by IPOUPDTE. 3. When STRING2 is longer than STRING1, blanks are deleted from pools of two or more blanks following STRING1 within the record, up to and including position 71, thus shifting to the right some non-blank characters that follow STRING1. A field consisting of only one blank is not deleted. If there is no place to delete blanks (that is, no place to shift the following non-blank characters into), an error message is issued, the record is not updated, and processing continues with the next record. Inability to update within a comment record or comment portion of a record produces a return code of 4. Otherwise, the return code is 8. 4. When the length of STRING2 is less than that of STRING1, blanks are inserted after the next pool of two blanks following STRING1. 5. Updates to a record occur in the order that the control statements were entered. Each control statement processes the record in its entirety before the next control statement processes the record. IPOUPDTE CONTROL STATEMENTS ____________________________ You tell IPOUPDTE what you want to update in the specified libraries' members by specifying STRING1 and STRING2 and optionally STRING3 on control statements. You can supply the control statements either in a SYSIN data set or from the system console. IPOUPDTE has four types of control statements: the basic control statement, the extended control statement, the END statement, and the comment statement. Only the first 72 positions of the control statement are used; positions 73 through 80 are ignored. STRING1 begins in position 1. The maximum length for STRING1, STRING2, or STRING3 is 70 characters. The minimum length for STRING1 is 1. The minimum length for STRING2 and STRING3 is zero. If STRING2 is null--that is, a length of zero--STRING1 is deleted from the record. If you make a mistake in the syntax of a control statement and you are using SYSIN for input, IPOUPDTE writes a error message identifying the faulty statement, scans the remaining control statements for errors, and then terminates without processing any libraries or making any updates. The Basic Control Statement ____________________________ The syntax of the basic control statement is as follows: STRING1