×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Gary,
You have to define two separate data structures.
One for input and One for output.

Try
D injcds DS
Likerec(APAM01JC.APAM01JCR:*INPUT)
D outjcds DS
Likerec(APAM01JC.APAM01JCR:*OUTPUT)

If you need to copy the data between the two you can usually use
outJcds = InJcds;

However, you can also use
EVAL-CORR outJcds=InJcds;


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gary Thompson
Sent: Friday, March 16, 2012 7:16 AM
To: RPG programming on the IBM i / System i
Subject: RE: Free format read and write in subprocedure

Alan, thank you for your patience.

Specifying *Output gets close, but:

*RNF7595 The result data structure JCDS does not include a
subfield in position 1 for record format APAM01JCR.

Is raised on: Read(E) APAM01JC jcds;

There is at least one thread in Midrange discussing RNF7595.

The relevant subprocedure F and D specs:

FAPAM01JC UF A E K DISK USROPN Qualified
Job Control file

D jcds DS
Likerec(APAM01JC.APAM01JCR:*OUTPUT) Job Control DS
*D jcds DS
Likerec(APAM01JC.APAM01JCR:*INPUT) Job Control DS
*D jcds DS Likerec(APAM01JC.APAM01JCR:*ALL)
Job Control DS
*D jcds E DS Extname(APAM01JC:APAM01JCR:*ALL)
Job Control DS

And here, clean at last, the write:

Write(E) APAM01JC.APAM01JCR jcds;

As you see from the collection of D specs, I played whack-a-mole looking
for a combination that would compile, but just exchanged one or three
compile errors for another one or so.

And now: I am keeping the Read and replacing the Write with an SQL
Insert.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Thursday, March 15, 2012 5:47 PM
To: RPG programming on the IBM i / System i
Subject: Re: Free format read and write in subprocedure

You get that because the data structure is not declared as *Output.

On Thu, Mar 15, 2012 at 5:28 PM, Gary Thompson
<gthompson@xxxxxxxxxxx>wrote:

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.