I won't b/able to dspobjd to a file and then savobj all the entries though
since some are not prefixed by Q.
Thanks for your help
-----Original Message-----
From: rob@xxxxxxxxx
To: midrange-l@xxxxxxxxxxxx
Sent: Fri, 17 Nov 2006 4:00 PM
Subject: Re: Saving multiple source files to a single savf
I did mention doing the DSPOBJD to an output file, reading that, searching
for ODOBAT = the designator for source physical file. Then construct your
SAVOBJ command from that.
However, it would be a disservice of me to not suggest a different
alternative. The problem with using IBM output files is that they can,
and do, often change with new releases of OS. Often I will use the Object
APIs instead. After all, who wants a "record format level check" when
you're already wrestling with other surprises resulting from an OS
upgrade?
Granted, one way to get around most record format level checks is to
eschew the use of any F spec in RPG to open that file and to use imbedded
SQL instead. Being careful NOT to use "select all from ...". Because
selecting all from a file that has been updated to hold Y number of fields
into an externally defined data structure that only had X fields at the
last compile is a fatal error. Once upon a time, several versions back,
it wasn't. You just hoped that they kept new fields at the end.
Rob Berendt