I am mainframe Natural developer. The problem I am facing is that I am using two windowed maps in my program(DDCMTMDA & DDCMTMDB). The first one takes input and based on the input the second window is displayed right after it for confirming the input. The problem I am facing is that when i run the program after the first window is displayed and appropirate input is given the second window does not get displayed. Instead the first window is displayed again. If I single step through the program then it works fine and the second window displays as expected.
I am attaching a corrected version of the code. This has the same problem as before.
This program provides users with option to delete records directly from a table by entering the key. This could lead to serious issues and so we are forcing the user to confirm multiple times before the actual deletion. This is one reason we have some extra flags.
Here is the flow. Here the key of table is ps-id.
press pf4 on main screen (code not included). This will display the map PSCMTFI3.
type any ps-id in the field provided and press PF5. On doing so the screen is redisplayed asking user to press ‘ENTER’ to continue with the deletion process.
When the user presses ‘ENTER’ the 2nd screen PSCMTFI4 is displayed. This is the final confirmation screen where the user has to type in ‘YES’ in the field provided and press PF5. Only after this will be record actually get deleted (in DELETE-REC).
#CONFIRM-PSID is used so that the user does not change the ps-id entered between the PF5 & ENTER. If he does he will have to start from PF5.
input field on PSCMTFI3 is PSCMTFI3.#PISP-ID
input field on PSCMTFI4 is PSCMTFI4.#CONFIRM PROGRAM.TXT (2.02 KB)
Looks like a logic problem to me. When I test a variation of the code you supplied, two windows work just fine. Stepping through with the debugger will affect the *PF-KEY value - you might try “MOVE *PF-KEY to #PF-KEY” and testing #PF-KEY while you debug your logic.
Made some changes and its working now.
Issue: modified status of PSCMTFI3.#PISP-ID-CV gets reset only on REINPUT FULL and not on REINPUT.
So changed REINPUT ‘Press ENTER to commit’
to REINPUT FULL ‘Press ENTER to commit’.