I want to thank everyone for their input.
For the archives.
The copy/paste was working , but too much room for error.
I did find a tool, which we had, TAATOOL/CPYSPLTXT.
I had to modify the FROMPOS, 10 for DSPF, PF, LF, 3 for RPGLE.
I then edited the source, deleted the Expanded source, other info inserted by the compile.
I emailed TAATOOL, they agreed - it would be a nice enhancement to recreate actual source as close as possible without having to do the extra editing.
We'll add that to our list of future items.
For a sanity check, I had programmers compile the objects from the rebuilt source, compared the Format level Identifiers of the new objects to the existing objects, all matched.
For DSPF, PF, LF. - FROMSTRPOS(10)
TAATOOL/CPYSPLTXT FILE(DCMRTV01) JOB(012995/ALISONR/DCMRTV01) TXTMBR(DCMRT
V01) TXTFILE(CMFILESRST/QDDSSRC) REPLACE(*YES) FROMSTRPOS(10)
For RPGLE - FROMSTRPOS(3)
TAATOOL/CPYSPLTXT FILE(DCMPGM02) JOB(018326/KIMC/DCMPGM02) TXTMBR(DCMPGM02
) TXTFILE(CMFILESRST/QRPGLESRC) REPLACE(*YES) FROMSTRPOS(3)
Paul
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Wednesday, November 05, 2014 12:00 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Rebuilding a source member from a spoolfile
On 05-Nov-2014 08:33 -0600, Steinmetz, Paul wrote:
Lost some source code, rebuilding it from a spoolfile.
Currently doing using copy/paste, screen by screen.
Anyone know of any tricks or tips to accomplish this quicker.
That would depend significantly, seemingly, on what feature produced the spool file? If a compiler listing vs an effective print-member feature seem germane, and then which compiler or which print feature, and possibly even the language feature or release that was used for whatever had produced the SPLF may be germane.
On a few occasions when I had lost source [that had not yet been included in a backup] I usually would, if available, copy a spool file [from a compile listing or prior effective 6=Print] into a source file and then compose SQL to delete all header\footer rows [delete from mysrcmbr where srcdta like :header-like or srcdta like :footer-like] and then truncate all suffix-data and prefix-data from the SRCDTA of each record [update mysrcmbr set srcdta=substr(srcdta, :pfx-end, :sfx_str)].
After that, I would start my editing [e.g. STRSEU] to perform anything that the SQL requests could not effect for making the spooled data appear or function as the source-type requires.
--
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.