× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11/17/06, fbocch2595@xxxxxxx <fbocch2595@xxxxxxx> wrote:

Hi, I want to save all PF-SRC files from a single library to a single
savf.  Is this possible using an OS400 save command?  If not, does anyone
have any code to accomplish this?
Thanks for any info


I don't have code, but it is relatively straight-forward -- I am building
piecemeal.  You might want to add logic for error processing, clearing the
save file, and to check for the 300 item limit on the SAVOBJ object parm.

PGM
DCL VAR(&FILES) *CHAR 350
DCLF       FILE(outfilelib/outfile)

DSPFD FILE(library/*ALL) TYPE(*ATR) OUTPUT(*OUTFILE) FILEATR(*PF)
OUTFILE(outfilelib/outfile)

/** --> The field PHDTAT is the "File Type", with D for Data or S for
Source.  **/
/** roll through the out file, and if the type is S, add the file to the
list.**/

$RD:        RCVF       RCDFMT(QWHFDPHY)
           MONMSG     MSGID(CPF0000) EXEC(GOTO CMDLBL($END))

           IF         COND(&PHDTAT *NE 'S') THEN(GOTO +
                            CMDLBL($RD))

          CHGVAR     VAR(&FILES) VALUE(&FILES || &PHFILE || ' ')
GOTO       CMDLBL($RD)

/** --> Then do a SAVOBJ  **/
SAVOBJ OBJ(&FILES) LIB(library) DEV(*SAVF) SAVF(SAVLIB/SAVEFILE)

ENDPGM

Good luck!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.