|
>Date: Mon, 15 Nov 1999 09:11:40 -0500 >From: John Hall <jhall@hillmgt.com> > >We are in the final stages of testing some converted programs >RPG/II -> RPGLE > >We would like to use CMPPFM on the spool files and have setup >programs to cpysplf & all that > >The problem we are having is that the old system outputs a date a >little differently than the new system. >old : 7/31/99 >new : 07/31/99 >of course CMPPFM sees this as a changed record. > ... John, there's no way to do "date" output and suppress leading zeros. I can think of lots of ways to change your RPG IV programs to get the output you want, but rather than change your RPG IV programs, it might be easier to write a utility that would process the CMPPFM output and discard any differences that had this pattern. Here's a sketch of a method to do this: for each pair of lines that are different | - scan the second line for '/' (into an array) | - initialize i to 1 | - go through the slash-array looking at elements i and i + 1 | while they are both non-zero | | if (the pair of slashes are 3 apart) | | AND (the character 2 before the first one is '0') | | AND (the other relevant characters before/between/after | | the slashes are numeric) | | | - change the character 2 before the first one to '1' | | | - add 1 to i | | endif | | add 1 to i | endwhile | - if the lines are now the same, discard this difference endfor Barbara Morris +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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 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.