× 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.


  • Subject: RE: Anyone have RGZPF?
  • From: "Gary Kuznitz " <docfxit@xxxxxxxxxxx>
  • Date: Thu, 4 Jan 2001 22:47:01 -0800

Maybe this is what you are looking for.

See below....

> >Years ago News/400 published a utility called RGZPF which was handy
> >for reorganizing files in a library.  I used it at my previous
> >employer, and I imagine they're still using it.  I didn't think to
> >make a copy of it to bring here, assuming I'd be able to get it
> >from the CD or web site. Unfortunately, it was published too far
> >back to be available on either! Does anyone have a copy of it that
> >they'd be willing to e-mail to me?  I could re-write it from
> >memory, but I'd rather save the debugging time if possible. 
> >Thanks!
> >
> >Dave Shaw
> >Spartan International, Inc.
> >Spartanburg, SC
**********************************************************
 *       
Midrange Computing Programs Associated With Article          * *      
              * *       Published in the 09/91 Issue    B099106           *
**********************************************************
 *          
       Transfer to AS/400 Instructions                    *
**********************************************************

1) Copy this data file to a source physical file as a single member
   using the CPYF command being sure to use the FMTOPT value of 
*CVTSRC
   and the SRCOPT values of *SEQNBR and *DATE. Here is an example of a
   CPYF command that would work for downloaded file B088905:

   CPYF FROMFILE(B088905) TOFILE(your library/your source file) +
          MBROPT(*ADD) FMTOPT(*CVTSRC) SRCOPT(*SEQNBR *DATE)

**********************************************************
*                           --- Members ---                          
* * Source Member Name  Source Member Type                            
* 
**********************************************************
ALL001CL            CLP                                  
 RGZALLPF           CMD                                
**********************************************************
 * Begin
Member - ALL001CL  , Type - CLP                               *
**********************************************************
 ALL001CL: +
   PGM PARM(&LIB &MBR)

   DCL VAR(&LIB)        TYPE(*CHAR) LEN(10)
   DCL VAR(&MBR)        TYPE(*CHAR) LEN(6)
   DCL VAR(&MSGDTA)     TYPE(*CHAR) LEN(80)
   DCL VAR(&MSGF)       TYPE(*CHAR) LEN(10)
   DCL VAR(&MSGFLIB)    TYPE(*CHAR) LEN(10)
   DCL VAR(&MSGID)      TYPE(*CHAR) LEN(7)
   DCL VAR(&NORGZ)      TYPE(*DEC)  LEN(5 0)
   DCL VAR(&NORGZCHAR)  TYPE(*CHAR) LEN(5)
   DCL VAR(&RGZ)        TYPE(*DEC)  LEN(5 0)
   DCL VAR(&RGZCHAR)    TYPE(*CHAR) LEN(5)

   DCLF FILE(QADSPOBJ)

   MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(SNDERRMSG))

   DSPOBJD OBJ(&LIB/*ALL) OBJTYPE(*FILE) OUTPUT(*OUTFILE) +
      OUTFILE(QTEMP/QADSPOBJ)
   OVRDBF FILE(QADSPOBJ) TOFILE(QTEMP/QADSPOBJ)

LOOP: +
   RCVF
   MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END_LOOP))

   IF COND(&ODOBAT *EQ 'PF') THEN(DO)
      /* Reorganize all members */
      IF COND(&MBR *EQ '*ALL') THEN(DO)
         RGZPFMALL FILE(&LIB/&ODOBNM)
         MONMSG MSGID(CPF0000) EXEC(DO)
            SNDPGMMSG MSG('File' *BCAT &ODOBNM *BCAT 'not +
               reorganized.') MSGTYPE(*DIAG)
            CHGVAR VAR(&NORGZ) VALUE(&NORGZ + 1)
            GOTO CMDLBL(LOOP)
         ENDDO
      ENDDO
      /* Reorganize one member */
      ELSE CMD(DO)
         RGZPFM FILE(&LIB/&ODOBNM) MBR(&MBR)
         MONMSG MSGID(CPF0000) EXEC(DO)
            SNDPGMMSG MSG('File' *BCAT &ODOBNM *BCAT 'not +
               reorganized.') MSGTYPE(*DIAG)
            CHGVAR VAR(&NORGZ) VALUE(&NORGZ + 1)
            GOTO CMDLBL(LOOP)
         ENDDO
      ENDDO
      CHGVAR VAR(&RGZ) VALUE(&RGZ + 1)
   ENDDO
   GOTO CMDLBL(LOOP)

END_LOOP: +
   CHGVAR VAR(&RGZCHAR) VALUE(&RGZ)
   CHGVAR VAR(&NORGZCHAR) VALUE(&NORGZ)
   SNDPGMMSG MSG('RGZALLPF LIB(' *CAT &LIB *TCAT ') MBR(' 
*CAT &MBR +
      *TCAT ') is complete.') MSGTYPE(*COMP)
   SNDPGMMSG MSG(&RGZCHAR *BCAT 'files reorganized.') 
MSGTYPE(*COMP)
   SNDPGMMSG MSG(&NORGZCHAR *BCAT 'files not reorganized.') +
      MSGTYPE(*COMP)
   GOTO CMDLBL(ENDPGM)

SNDERRMSG: +
   RCVMSG MSGTYPE(*EXCP) RMV(*NO) MSGDTA(&MSGDTA) 
MSGID(&MSGID) +
      MSGF(&MSGF) MSGFLIB(&MSGFLIB)
   IF COND(&MSGID *NE ' ') THEN(DO)
      SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) 
MSGDTA(&MSGDTA) +
         MSGTYPE(*DIAG)
      SNDPGMMSG MSGID(CPF0002) MSGF(QCPFMSG) 
MSGTYPE(*ESCAPE)
   ENDDO

ENDPGM: +
   ENDPGM
**********************************************************
* End Member - ALL001CL                        
**********************************************************
* Begin Member - RGZALLPF  , Type - CMD                              
**********************************************************
 RGZALLPF:   CMD        PROMPT('Reorganize All Physical Files')

             PARM       KWD(LIB) TYPE(*SNAME) LEN(10) MIN(1) +
                          PROMPT('Library name')
             PARM       KWD(MBR) TYPE(*CHAR) LEN(6) RSTD(*YES) +
                          DFT(*ALL) VALUES(*ALL *FIRST *LAST) +
                          PROMPT('Member')
**********************************************************
* End Member - RGZALLPF                                   *
**********************************************************

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.