How to send the data from a Physical file to a Flat file

140 pts.
Tags:
Flat files
Physical File
RPG
RPG error handling
RPG/400
RPG/400 field validation
Please check the below prgram and advice me how to send the data from APH(physical file) to Flate file SAAPH (flat file). FTRF is a datstructure created for send the data only this two fields in flat file. i am not sure how to club this data structre and flat file in programe. FAPH IF E DISK FSAAPH O E DISK A F SAAPH KRENAMESA100 IFTRF DS I P 1 80EDTE I P 9 100CCDE C READ APH 20 C *IN20 DOWEQ*OFF C WRITESA100 C LEAVE C ENDDO i am getting error while compiling
ASKED: December 23, 2008  12:45 PM
UPDATED: December 23, 2008  5:02 PM

Answer Wiki

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

FAPH IF E DISK
FSAAPH O E DISK A
F SAAPH KRENAMESA100
IFTRF DS
I P 1 80EDTE
I P 9 100CCDE
C READ APH 20
C *IN20 DOWEQ*OFF
C Eval SAAPH = EDTE + CCDE <– assumes SAAPH has one field named SAAPH
not sure you’ll like the results see alternative below
C WRITESA100

C READ APH 20 <————— added — you’ve written an endless loop
C ENDDO

using %EDITC converts numeric to character
C Eval SAAPH = %editc(EDTE,’X') + %EDITC(CCDE,’X')

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
  • Gilly400
    Hi, You'll also need to tell the program where and when to end. If this is the complete program listing you could do this by putting the following lines at the end :- MOVE *ON *INLR (or EVAL *INLR = *ON) depends on which you like best RETURN Regards, Martin Gilbert.
    23,730 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