Source sequence numbers used in copies
When you copy to a database source file, you can use the SRCOPT parameter to update sequence numbers and initialize dates to zeros.
By default, the system assigns a sequence number of 1.00 to the first record and increases the sequence numbers by 1.00 for the remaining records. You can use the SRCSEQ parameter to set a fractional increased value and to specify the sequence number at which the renumbering is to start. For example, if you specify in the SRCSEQ parameter that the increased value is .10 and is to start at sequence number 100.00, the copied records have the sequence numbers 100.00, 100.10, 100.20, and so on.
If a starting value of .01 and an increased value of .01 are specified, the maximum number of records that can have unique sequence numbers is 999,999. When the maximum sequence number (9999.99) is reached, any remaining records will have a sequence number of 9999.99. The following example is about copying source from one member to another in the same file. If MBRB does not exist, it is added; if it does exist, all records are replaced.
CPYSRCF FROMFILE(QCLSRC) TOFILE(QCLSRC) FROMMBR(MBRA) + TOMBR(MBRB)The following example is about copying a generic member name from one file to another. All members starting with PAY are copied. If the corresponding members do not exist, they are added; if they do exist, all records are replaced.CPYSRCF FROMFILE(LIB1/QCLSRC) TOFILE(LIB2/QCLSRC) + FROMMBR(PAY*)The following example is about copying the member PAY1 to the printer file QSYSPRT (the default for *PRINT). A format similar to the one used by service entry utility (SEU) is used to print the source statements.CPYSRCF FROMFILE(QCLSRC) TOFILE(*PRINT) FROMMBR(PAY1)When you copy from a device source file to a database source file, sequence numbers are added and dates are initialized to zeros. Sequence numbers start at 1.00 and are increased by 1.00. If the file being copied has more than 9999 records, then the sequence number is wrapped back to 1.00 and continues to be increased unless the SRCOPT and SRCSEQ parameters are specified.
When you are copying from a database source file to a device source file, the date and sequence number fields are removed.
Parent topic:
Copying source file data