I have a subfile windowing program that is written for both 80 and 132 column mode (not sure if that matters). It is very simple and displays a short list of payment options for a customer. This is almost always used in 132 column mode (which i used for testing).
When an error condition occurs, I display the error in the header portion of the window display, subfile records are cleared (in loadsfl). The user can then press F3, F12 or enter. In the program, it simply clears the parameter fields passed in and does a "return" to the calling pgm.
Here is the strange part. After the return (when the program has ended according to debug), the interactive session actually displays the window (in 80 column mode) WITH the subfile records previously cleared.
I cannot figure out how or why it's doing this. Here is a code snippet:
Any ideas what may cause this behavior?
When an error condition occurs, I display the error in the header portion of the window display, subfile records are cleared (in loadsfl). The user can then press F3, F12 or enter. In the program, it simply clears the parameter fields passed in and does a "return" to the calling pgm.
Here is the strange part. After the return (when the program has ended according to debug), the interactive session actually displays the window (in 80 column mode) WITH the subfile records previously cleared.
I cannot figure out how or why it's doing this. Here is a code snippet:
Code:
[SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]dou[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]'a'[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]'b'[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]exsr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] loadsfl[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]// Load Subfile[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]write[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] selcard[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]write[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] selcardf[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]exfmt[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] selcard[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]if[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *inkc [/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#808000][SIZE=2][COLOR=#808000]*on[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] or[/SIZE] [SIZE=2]*inkl [/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#808000][SIZE=2][COLOR=#808000]*on[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] or[/SIZE] [SIZE=2]@error [/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]<>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#808000][SIZE=2][COLOR=#808000]*blanks[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2]pent# [/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]=[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] *all'0'[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]clear[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] plst4[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]clear[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] pexpd[/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080];[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]return;[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]endif;[/COLOR][/SIZE][/COLOR][/SIZE] ... more code here [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]endif;[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]enddo;[/COLOR][/SIZE][/COLOR][/SIZE] [SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]return;[/COLOR][/SIZE][/COLOR][/SIZE]
Comment