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


  • Subject: RE: Copying file with *nochk
  • From: "Kahn, David [JNJFR]" <DKahn1@xxxxxxxxxxxxx>
  • Date: Wed, 22 Sep 1999 09:52:52 +0200

Çagatay,

I don't know whether this is your problem, but there is a bug in the RPG you
posted. It will write the last record twice as you don't test for end of
file until after you write the output record. You might also note the both
the SETLL and the RETRN are redundant, though they don't do any actual harm.

You could replace your entire C specs with the following:

     C           *IN99     DOUEQ*ON                        
     C                     READ SSK4AYR                  99
     C           *IN99     IFEQ *OFF                       
     C                     WRITESSK4AYT                    
     C                     ENDIF                           
     C                     ENDDO                           
     C                     SETON                     LR    

I don't want to start up the DOW vs. DOU debate again, but you could equally
well use (and I actually prefer, though many would strongly disagree) the
following:

     C                     READ SSK4AYR                  99     
     C           *IN99     DOWEQ*OFF                            
     C                     WRITESSK4AYT                         
     C                     READ SSK4AYR                  99     
     C                     ENDDO                                
     C                     SETON                     LR         

Hope this helps,

Dave Kahn
Johnson & Johnson International (Ethicon) France
Phone : +33 1 55 00 3180
Email :  dkahn1@jnjfr.jnj.com (work)
           dkahn@cix.co.uk      (home)


-----Message d'origine-----
De: Çagatay AZKIN [mailto:cazkin@ykk.com.tr]
Date: 22 September 1999 07:57
À: RPG400-L@midrange.com
Objet: Re: Copying file with *nochk


First, Thank You Your repply,

1. I use CPYF. But When I copy it using RPG Program, result was same.

2. CUM PTF was applied about 6 months ago

3. I have Attached program and DDS of each 2 files. Please refer;
+---
| 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 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.