Results 1 to 2 of 2

Thread: Clear columns 1-5 in Source Member

  1. #1

    Default Clear columns 1-5 in Source Member

    To clear columns 1-5 in a source member:
    Code:
     
    cl: OVRDBF FILE(qrpglesrc) TOFILE(mylib/qrpglesrc) MBR(mymbr);
    Update  QRPGLESRC a                                       
    set a.srcdta = '     ' concat substr(a.srcdta, 6, 100)    
    where substr(a.srcdta, 1, 5) <> ' '                       
    and a.srcseq < (select min(b.srcseq)                           
                         from qrpglesrc b                     
                         where substr(b.srcdta, 1, 2) = '**')
    Notes:
    1. If in a batch program, you will need to add an OVRSCOPE to the override command.
    2. This will only remove entries until the first '**' (possible CTDATA entry) is found.
    Regards

    Kit

  2. Default

    The code posted was run from Navigator - including the CL:... - hence the ";" at the end of the statement and no OVRSCOPE.
    Regards

    Kit

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •