× 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: RPG to RPGLE conversion error
  • From: BillsVilla@xxxxxxx
  • Date: Thu, 29 Mar 2001 19:08:36 EST

In a message dated 3/29/2001 6:42:47 PM Eastern Standard Time,
jlundy@rbnet.com writes:


Purpose of code is to test existence of file.

C                   CALL      'QUSROBJD'
C                   PARM                    RCVVR2
C                   PARM      100           RCVLEN
C                   PARM      'OBJD0100'    FILFMT            8
C                   PARM                    FILLIB
C                   PARM      '*FILE'       OBJTYP            8
C                   PARM                    ERROR
C     MSGID         IFNE      *BLANKS
C                   EXSR      SNDMSG
C                   GOTO      END
C                   ENDIF


Why not just use a CL with CHKOBJ and MONMSG to see if the file exists? You
could always throw something into the *LDA to let the program know if it
exists or not.

5 lines of code total between CL and RPG as compared to the above 12 lines.

:)

Bill

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.