RPG 400 DATA STUCTURES

pts.
Tags:
AS/400 Subfiles
RPG/400
Am trying to write to a flat file from a pf using data structures but am getting some errors 'The name specified previously is defined as file or record name. Specification ignored ' Heres the sample code FABCL01 IF E K DISK FDEF O E DISK A F DEF KRENAMEDA100 IABFLAT DS I 1 8 AADT I 9 10 AACM I 11 12 AAPR I DEF ABFLAT C READ ABCL01 20 C *IN20 DOWEQ*OFF C MOVELABIR AADT C MOVELABCM AACM C MOVELABCPX AAPR C WRITEDA100 C READ ABCL01 20 C ENDDO C SETON LR C RETRN

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

I think your problem is that your file is called DEF and that you also try defining a field or data structure called DEF.

Regards,

Martin Gilbert.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    IABFLAT DS I 1 8 AADT I 9 10 AACM I 11 12 AAPR I DEF ABFLAT <-- this guy should be the record name - which you overrode to DA100 as in I DA100 ABFLAT But it's awhile since I've used I specs in this way and I think it went like this: I DA100 NS <-- but this wasn't using the IPI format for input maybe the ipk??? I 1 8 AADT I 9 10 AACM I 11 12 AAPR
    50,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following