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



Confusion over dates probably originates from the original post. The
following "This flat file does not contain any date" should be replaced
with "This flat file does not contain any dot". Dot, not date.

Too bad there is no hash available with RTVOBJD like there is with file
level identifiers and format level identifiers. I suppose it might impact
overhead.

A dot in the file name is perhaps indicative that a technique that was
used since the S/36 (or earlier) might be up for some review.

Part of this review may be to check just how many I/O's this process
generates. First, you're doing whatever else ADMPGMC does. If it's doing
your comparing I would think it would pass back a parameter saying
different or not. And then you'd have some logic based on that parameter.

Then you're clearing the member of the "to" file, ADM.FILE.
If this clear errors out because the file does not exist, then create the
"to" file.
Then you copy the "from" file to the "to" file with a replace option. (Why
the clrpfm if you're using replace?)
Then you perform the action of COMMANDC, which isn't really self
explanatory to me. Of course, naming your parameters P1 and P2 was of a
great assistance.
Then, regardless of the outcome of COMMANDC, you delete the 'from' file.

Perhaps you didn't know that CL supports comments. You can either use
them as a seperate line, or at the end of a line of code. Like

/* Compare the files, if they are different then process them outside of
this program */
CALL PGM(ADMPGMC)

or
CALL PGM(ADMPGMC) /* Compare the files, if they are different then process
them outside of this program */

Of course tying up three characters of the object name to signify that
it's a program (admPGMc) seems like a waste since it's already specified
with the object type. But I've seen lots of people do such things with
job queues and output queues.
WRKOBJPDM MYLIB
Object Type
ADMPGMC *PGM
BPCSOUTQ *OUTQ
BPCSJOBQ *JOBQ
WORKDTAQ *DTAQ
COMMANDC *CMD

WRKLNK '/QSYS.LIB/MYLIB.LIB/*'
ADMPGMC.PGM
BPCSOUTQ.OUTQ
BPCSJOBQ.JOBQ
WORKDTAQ.DTAQ
COMMANDC.CMD

Rob Berendt

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.