RPG query

20 pts.
Tags:
RPG
RPG/400
Hi Martin, thanks for the previous query. Now i want to read the data of a DB file and display the data via display file. I have written following code for this: FPFRPG1 IF E K DISK FDSP1 CF E WORKSTN C READ REC C DOW *IN03=*OFF C EXFMT DSP C IF *IN01=*ON C ENDIF C READ REC C ENDDO C SETON LR After running this program, i am not able to see the data when i press F1. it is only when i press F1 3 to 4 times, i can see the data but that too not complete. could you please have a look...

Answer Wiki

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

Hi,

I’m nost sure why you need the *IN01 code – this won’t do anything. Try this – This will display your next record, each time you press enter :-

FPFRPG1 IF E K DISK
FDSP1 CF E WORKSTN
C READ REC
C DOW *IN03=*OFF
C EXFMT DSP
C READ REC
C ENDDO
C SETON LR

This will display your next record, each time you press F1. Notice the ENDIF is after the READ :-

FPFRPG1 IF E K DISK
FDSP1 CF E WORKSTN
C READ REC
C DOW *IN03=*OFF
C EXFMT DSP
C IF *IN01 = *ON
C READ REC
C ENDIF
C ENDDO
C SETON LR

Regards,

Martin Gilbert.

Discuss This Question:  

 
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

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