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



Actually, "RCVF" _is_ the read statement -- what the loop does is
to read each record in the file sequentially (each RCVF returns the
next record), and the MONMSG simply checks to see if it has reached
end-of-file. AFAIK, the only thing you can do with "pure" CL is to read
records sequentially -- there is no way to read a specific record by key
or record number (or add, update, or delete records) without going
"beyond" CL as others have described in their postings. . . .

Having said that, while the functionality seems sort of limited, I have
found it to be _very_ powerful in certain circumstances -- particularly
when I want to do the same thing to a large number of objects (change
authority, create a duplicate in another library, compile source members,
etc.). In my CL, I first use the appropriate DSP* command to create a file
with a list of the objects I want to work with; then I run that file
through the
loop to do what I want to do. I was responsible for Y2K remediation at my
company, and this method helped save weeks (or months) over trying to do
it all manually (plus, it eliminated manual errors. . .)

HTH

Mike Naughton

RPG400-L@midrange.com writes:
>Could you place a read statement in that loop? I read a file in a CL
>program several times, but it was several years ago. What statement do
>you put after the MONMSG? 
>I am the one who originally wrote the question. All these other
>statements that the others are writing about are not CL statements, so I
>suppose that officially you can not update a database file in a CL
>program. 
>
>Sincerely, Nancy 
>
>On Tue, 29 Aug 2000 12:09:51 -0400 "Mike Naughton"
><mnaughton@juddwire.com> writes:
>> RPG400-L@midrange.com writes:
>> >Could you read the file sequentially? Top to Bottom of file.
>> 
>> Easily:
>> 
>>      DCLF            <filename>
>> 
>> LOOP:
>>      RCVF
>>      MONMSG  CPF0864 EXEC(GOTO END)  /* end of file */
>> 
>>      <do your processing here>
>> 
>>      GOTO            LOOP
>> 
>> END:
>> 
>> Mike Naughton


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA  01376
413-863-4357 x444
mnaughton@juddwire.com


+---
| 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 thread ...

Follow-Ups:
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.