How can i position the cursor at the beginning of the input field?

45 pts.
Tags:
RPG ILE
RPG ILE subprocedure
Program a calls pgm b that displays a window, with first input field an unsigned numeric, length 3. Screen is compiled with *rstdsp = yes. Control passes to pgm c then back to b. On return to b, the cursor is always at the 3rd position in the input field as it was before going to program c. How can i get the cursor to be positioned at the beginning of the input field?

Answer Wiki

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

*rstdsp = yes isn’t something I’m that familiar with but my research shows it to be important when you go to another program & screen and return and expect to read the original screen. Not the case you mentioned above.

I suspect that your dds includes a CSSRLOC — this will position the cursor to the row and col specified.
Your program can detect the cursor location in one of two ways so it can set these values
- with the DDS keyword RTNCSRLOC
- with the file information data structure for the display file (positions 370-371 return a binary number which when divided by 256 gives the row position and the remainder is the column position.

The CRSLOC keyword can be turned on/off with an indicator if necessary.

Hope this helps

The display attribute – position cursor can be added to the keywords for the field and can be controled by an indicator.
MYFLD ………………………..
50 DSPATR(PC)

Phil

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, Just change the RSTDSP to *NO. You can try this without re-compiling :- CHGDSPF FILE(MYFILE) RSTDSP(*NO) 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