Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with function key logic

Status
Not open for further replies.

Ju5

Programmer
May 25, 2007
85
0
0
PH
I have a piece of program that checks a file to see if a record exists and displays a message on the screen for the user if it doesn't.

The message asks the user to press F12 to ignore the issue but looking at the code I don't think the logic for the continue exists. Below is the bit of code. I need to find a way for the program to accept the F12 and continue.

C key chain filename 99
C *IN99 IFEQ '1'
C I ANDLT 50
C EDTFLG IFNE 'E'
C Z-ADD RRN1 H@PAG1
C END
C MOVE '1' *IN21
C ADD 1 I
C MOVE 'USR0220' MSGS(I)
C MOVE 'E' EDTFLG
C EXSR $EDMSG
C END

I'm thinking of adding the following code:

C *INKL IFEQ '1'
c continue
c endif

but I can't find the Continue command.

Any suggestions on what I can use to make the program continue?

Thanks in advance.
 
You are on the right track - you just have to define that funcion key in the display file (ether at the record format level or the file level), with no resulting indicators:

Code:
     A                                      CF12


-- Francis
I'd like to change the world, but I can't find the source code.
 
Is the command CONTINUE or NEXT LINE valid in an RPGLE program?
 
No. The 5250 data stream doesn't work that way.

After the message is displayed, set on an indicator, and loop back to your EXFMT. Check to see if the indicator is on.

-- Francis
I'd like to change the world, but I can't find the source code.
 
It sounds like what you're after is the ability to break out of a loop long enough to accept input from the user, then to go back to where you were in the loop.

I think you might be able to do that if you use a window to display your message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top