Hello,

This code will not work.

When you do the READ and LR is seton, it will still do the internal code
inside of your DOW loop.



Thanx,

Nick



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx



From: "sjl" <sjl_abc@xxxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 11/28/2011 05:29 PM
Subject: Re: RPG400 same fields name of Input and Output files
Update &Writequestion
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Like this... ;-)

- sjl


0001.00 FFILEA IF E K DISK
0002.00 FFILEB UF E K DISK A
0003.00 *
0003.04 IFMTA
0003.05 I KEY KEYA
0003.06 I FIELD1 FLD1A
0003.07 I FIELD2 FLD2A
0003.12 *
0004.00 C *INLR DOWEQ*OFF
0005.00 C READ FMTA LR
0006.00 C KEYA CHAINFMTB 99
0007.00 C MOVE FLD1A FIELD1
0008.00 C MOVE FLD2A FIELD2
0009.00 C *IN99 IFEQ *ON
0010.00 C MOVE KEYA KEY
0011.00 C WRITEFMTB
0012.00 C ELSE
0012.01 C UPDATFMTB
0013.00 C ENDIF
0014.00 C ENDDO


"Barbara Morris" wrote in message
news:mailman.13281.1322514835.2520.rpg400-l@xxxxxxxxxxxx...

On 2011/11/28 1:31 PM, Charles Sallee wrote:
Is this a RPG advice site or a re-education camp? This poor guy just
asked a small question and he gets 7 emails advising him to change the
format he is using.


It's a small question, but there isn't a small answer for it.

If Gary, the OP, really is using RPG III, there isn't any* solution to
his problem other than the one he already showed in his question, using
a temp field. So our choice is to answer "sorry, you have to create a
temp for each field", or to answer "here's how you can do it in RPG IV".

* Well, there is actually another RPG III solution which is to use
I-spec renames to rename the fields of one of the files, and then do
manual assignments from one set of fields to another.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.