How do I copy a spooled file listing into a member of a source physical file?
I accidentally deleted the source member, but have a spooled copy taken via option 6. I would like to convert the spooled file back into the deleted member.
Software/Hardware used:
ASKED:
December 7, 2010 4:13 PM
UPDATED:
December 9, 2010 9:51 PM
CRTPF QTEMP/WFILE RCDLEN(133)
Although a length of 133 is reasonable, it implies two likely assumptions. First, it implies that the spooled file record length is 132. Second, it implies that the CPYSPLF command will specify the CTLCHAR(*FCFC) option.
If either of those assumptions isn’t true, then RCDLEN() might need to be a different value.
Tom
After some thought, you consider this:
The table will be the target for CPYSPLF. Then the view is the source for CPYF. By sizing the SRCDATA column and the SUBSTR() appropriately, you get just the columns of the spooled file that have the source data.
You might even have a WHERE clause on the view that drops the page headings from the source listing. The source member will need some editing to remove lines such as page headings.
Tom
Open a new member in your source file using SEU; F15=Browse/Copy options; Select 2=Spool file, and under the Browse/copy spool file section enter the spool file name, job, user, job number, and spool number; copy the spool file into the member and make any necessary adjustments to the alignment (LT and RT are your friends).
Addendum: you will need to strip out the page headings, &c., but unless you’re dealing with hundreds of pages it shouldn’t be particularly onerous.
…using SEU; F15=Browse/Copy options; Select 2=Spool file, and under the Browse/copy spool file section…
This is probably the best choice for a one-time or infrequent recovery option. Good call.
Tom