| 
 | 
   Original was pretty ugly.  Here's one that was pasted via Notepad, though
   I suspect it will wrap.  It not rocket science.  Pass in library, file and
   member, ORVDBF, run simple SQL statement.  It runs in a new activation
   group to automatically clean up the override.
   Sam
         * Description
         * ===========
         * This program sets the date in a source file member to zero.
         *
         *   This is good thing  before the  program first goes into
         *   Production.
         *   This is a bad thing to do on subsequent modification since it
         *   looses change information.
         * How Called
         * ==========
         * Call with a PDM option something like this:
         *   ZD    /* Zero Source Date */ CALL PGM(CLRSRCDAT) PARM(&L &F &N)
         *=== History =======================================================
         * Lennon 12/31/98  Original Coding
         *
         *===================================================================
        H dftactgrp(*no) actgrp(*new)
         * This automatically removes the OVRDBF at exit and means no clashes
         * with any other overrides.
        D CmdStr          s            200
        D CmdLgth         s             15p 5
        D
         *=== Parameters ====================================================
        D pLib            s             10
        D pFile           s             10
        D pMember         s             10
        C
        C     *entry        plist
        C                   parm                    pLib
        C                   parm                    pFile
        C                   parm                    pMember
        C
         *=== Override to correct member ====================================
        C                   eval      CmdStr = 'OVRDBF ZZSRCFILE '
        C                             + %trim(pLib)    + '/'
        C                             + %trim(pFile)   + ' '
        C                             + %trim(pMember) + ' '
        C                             + 'OVRSCOPE(*CALLLVL)'
        C                   eval      CmdLgth = %len(%trim(CmdStr))
        C                   call      'QCMDEXC'
        C                   parm                    CmdStr
        C                   parm                    CmdLgth
        C
         *=== Set the data to zero ==========================================
         * Using SQL means that it works no matter what the length of the
         * source file.  No level checks!
        C/Exec SQL
        C+   Update ZZSRCFILE
        C+   Set    SRCDAT = 0
        C+   Where  SRCDAT <> 0
        C/End-Exec
        C
         *=== Exit and delete activation group ==============================
        C                   eval      *inlr = *on
   >    >From: Kelly Cookson <KCOOKSON@xxxxxxxxxxxx>
   >    >Reply-To: Websphere Development Studio Client for
   >    iSeries<WDSCI-L@xxxxxxxxxxxx>
   >    >To: "'Websphere Development Studio Client for iSeries'"
   >    <WDSCI-L@xxxxxxxxxxxx>
   >    >Subject: RE: [WDSCI-L] Setting source change dates
   >    >Date: Tue, 27 Jan 2004 11:33:58 -0600
   >    >
   >    >The code would be appreciated. We're a COBOL shop and I'm not
   familiar
   >    with
   >    >SQLRPGLE.
   >
    
     ----------------------------------------------------------------------
   Rethink your business approach for the new year with the helpful tips
   here.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.