× 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 IV versus COBOL - field naming
  • From: StoneJ@xxxxxxxxxxxxxxxx
  • Date: Mon, 26 Mar 2001 09:49:31 -0500

In RPG:
 
If you have two input files with same-named fields, the fields must have the same attributes (both numeric and the same length, or both alpha and the same length.  If not, the compile will fail.
 
When you read a record from file1 with field CUSTID="CUST1", then read a different record from file2 with field CUSTID="CUST2", then the value "CUST1" is gone, and only the most recent value is available, which is CUSTID="CUST2".
 
So technically yes you can have two input files containing the same field names, but it is useless, only compiles sometimes, and will give meaningless results!
 
-----Original Message-----
From: geir.kildal@entragroup.com [mailto:geir.kildal@entragroup.com]
Sent: Friday, March 23, 2001 5:49 AM
To: COBOL400-L@midrange.com
Subject: RPG IV versus COBOL - field naming


Hello.

I COBOL, we can have two inputfiles containing the same fieldnames, and we can qualify the names when we use them(MOVE FIELDA in FILEA to FIELDB IN FILEB etc.).

In earlier RPG, this was not possible.  We had to have a unique name on every field.

My question is:  Has this canged in RPG IV?  Or do we still have to give each field a unique name?

Does anyone know?


Mvh.

Geir Kildal


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.