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



Hi folks,

I'm going in circles here and was hoping someone wouldn't mind helping me.
I'm trying to read data directly into a DS and then write the data to another file, either with an update or a write, using the data structure.
I know there are different styles, like READ file-name ds-name, and I'm not sure which is the preferred style.

First of all, we're on V5R4.
This program reads the records from an intermediate file and either updates or adds them to the master file.
The intermediate file was created using CRTDUPOBJ of the master file, which is why the record format is renamed.
The files each have 7 fields, of course with the same name.

1. I tried having a meaningful prefix on the F-spec but I received a compile error RNF2356, I think because there is a limit of 13 to the field name length.
What can I do to improve this?

2. I'm getting compile time errors:
*RNF7030 30 7 The name or indicator is not defined. (I.field1, I.field2, etc. for the 7 fields in the file)
*RNF7701 20 2 The data structure is not allowed for the operation. (Update ACCDOCR I and Write ACCDOCR I)

Any tips would be most appreciated.

Yours truly,

Glenn Gundermann
Work: (905) 501-6596
Cell: (416) 317-3144
glenn.gundermann@xxxxxxxxxxxxxxxx<mailto:glenn.gundermann@xxxxxxxxxxxxxxxx>



Here is my code (sans header comments):

h option(*srcstmt:*nodebugio)

// Intermediate eFile Document Code file in arrival sequence.
FACCDOCCOD2IF E DISK Rename(ACCDOCR:ACCDOCR2)
F Prefix('I.': 3)

// eFile Document Code file by Document Code.
FACCDOCCODLUF A E K DISK

//------------------------------------------------------
// Parameters.
//------------------------------------------------------

D CAEFL004 pr ExtProc('CAEFL004')
D CAEFL004 pi

//------------------------------------------------------
// Vaiable Declarations.
//------------------------------------------------------

D I e ds ExtName(ACCDOCCODE)
D Qualified

//------------------------------------------------------
// Start of Executable Code.
//------------------------------------------------------

/free

Read ACCDOCCOD2;

Dow Not %eof(ACCDOCCOD2);
Chain I.ACCTYPND ACCDOCCODL;

If %found(ACCDOCCODL);
Update ACCDOCR I;
Else;
Write ACCDOCR I;
EndIf;

Read ACCDOCCOD2;

EndDo;

*InLr = *On;
Return;

/end-free

________________________________
To learn more about Kuehne + Nagel Ltd, please visit our website at: www.kuehne-nagel.com For the Kuehne + Nagel email disclaimer, visit: http://www.kn-portal.com/material/Electronic_Email_Disclaimer_English_French.pdf



Visitez le site internet de Kuehne + Nagel Lt?e: www.kuehne-nagel.com Notre d?charge de responsabilit? est disponible comme suit: http://www.kn-portal.com/material/Electronic_Email_Disclaimer_English_French.pdf

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.