Ok, so this rejoins the issues I had with understanding memory in my other post a few months past. I have a program with a subfile that has two fields (let's call them FIELD1 and FIELD2) that can be filled. I want to put an F4 command function key. When pressing F4 on FIELD1, it should always behave in the same manner. But pressing F4 on FIELD2 should act differently depending on the value of FIELD1 of that subfile record. If FIELD1 is empty, it should act like the user had pressed F4 on FIELD1.
My issue is that I am unable to have the program take into account the screen value of FIELD1 when pressing F4 on FIELD2. If FIELD1 of a subfile record had a value of 'FIVE' when the subfile was loaded, then I clear the value (without pressing enter), and then press F4 on FIELD2, the program detects the value of 'FIVE'. I am not able to detect the current value of *BLANKS and I'm not sure how to.
According to IBM, the CFnn keyword should transfer the data from the screen into the input buffer and I should thus have access to it. But because it's a subfile, I'm not sure how it works exactly. All I know is that I cannot detect the value. If I instead read the subfile record by chaining it, then it'd simply overwrite the values in the memory with the values of that record but I still wouldn't have access to *BLANKS.
I still need to test more tomorrow but any insight would be appreciated.
My issue is that I am unable to have the program take into account the screen value of FIELD1 when pressing F4 on FIELD2. If FIELD1 of a subfile record had a value of 'FIVE' when the subfile was loaded, then I clear the value (without pressing enter), and then press F4 on FIELD2, the program detects the value of 'FIVE'. I am not able to detect the current value of *BLANKS and I'm not sure how to.
According to IBM, the CFnn keyword should transfer the data from the screen into the input buffer and I should thus have access to it. But because it's a subfile, I'm not sure how it works exactly. All I know is that I cannot detect the value. If I instead read the subfile record by chaining it, then it'd simply overwrite the values in the memory with the values of that record but I still wouldn't have access to *BLANKS.
I still need to test more tomorrow but any insight would be appreciated.
Comment