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



Just to expand a bit on what Joep says, when you create a file, in your DDS
you nominate a format name.  In the case of CONTACT, the format name has
also been made CONTACT.  This doesn't cause any direct problems.

It does, however, cause a hassle in RPG.  This is that RPG needs to have a
different name between the file and its formats.  To achieve this, as Joep
says, rename the format in the RPG.  By the looks of it you are using
RPG/400  To fix the problem, simply change your code from

1700  FACCTINF IP  E                    DISK
1800  FCONTACT IS  E                    DISK
1900   /COPY IASLNKRSRC,LINKVERSEX

to

1700  FACCTINF IP  E                    DISK
1800  FCONTACT IS  E                    DISK
1801  F            CONTACT                           KRENAMECONTACTR
1900   /COPY IASLNKRSRC,LINKVERSEX

CONTACTR is now the format name used in this program.  If you need to
rename fields or write/update a record, you will need to use CONTACTR, not
CONTACT.

As long as you have the format & file names the same, you will need to do
this sort of thing in every program you write.  To save yourself the
hassle, go back to the DDS for CONTACT and change the line that says

     A          R CONTACT

to

     A          R CONTACTR

or similar and then recompile.




"Joep Beckeringh" <joepb@tip.nl> on 12/11/99 08:36:09

Please respond to RPG400-L@midrange.com

To:   RPG400-L@midrange.com
cc:    (bcc: STEVEN J RYAN/DIAU)

Subject:  Re: records




Art,
Apparently the CONTACT file uses CONTACT as record name as well and the
compiler has to be able to keep the two apart.  So either you rename the
actual file, rename the record in the actual file or you rename the record
in the RPG program (in a continuation line for the F-spec in RPG III; with
the RENAME keyword in RPG IV).
Joep Beckeringh

----- Oorspronkelijk bericht -----
Van: Art Baker <Art_Baker@baan.com>
Aan: <rpg400-l@midrange.com>
Verzonden: donderdag 11 november 1999 22:09
Onderwerp: records

> I am trying to input 2 data files to a RPG program. I am new at this but,
I
> have a working RPG routine that processes one data file, just need to add
in
> a second data file. The compile error looks like:
>       1700  FACCTINF IP  E                    DISK
>
>              RECORD FORMAT(S):  LIBRARY ART FILE ACCTINF.
>
>                       EXTERNAL FORMAT INREC RPG NAME INREC
>
>       1800  FCONTACT IS  E                    DISK
>
>       1900   /COPY IASLNKRSRC,LINKVERSEX
>
>    A000000+  MEMBER LINKVERSEX IN FILE IASLNKRSRC LIBRARY IAS4000F02
OPENED
> FOR
>    A000100+  *  LINKVERSEX - IASLink Call Versioning Table
>
>    A000200+  *  ******************************************
>
>    A000300+  *
>
>  * 2122      1800   RECORD NAME CONTACT PREVIOUSLY DEFINED AS FILE NAME.
>
>              RECORD FORMAT(S):  LIBRARY ART FILE CONTACT.
>
>                       EXTERNAL FORMAT CONTACT DROPPED DUE TO ERROR OR
> IGNORE.
>
> The program does work using only the ACCTINF file. The second data file,
> CONTACT is the problem. What is the best way to get around this 2122
error.
> TIA
> Art
> +---
> | 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
> +---
>
+---
| 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
+---






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