Skip to main content

I have finally got Alfred to compile on our system with the help from M/F. I need help with a modification I want to do. I want the RW button on to be the default rather than the RO button. I have took a look but can not figure out where to make the modification.

 

 

I have finally got Alfred to compile on our system with the help from M/F. I need help with a modification I want to do. I want the RW button on to be the default rather than the RO button. I have took a look but can not figure out where to make the modification.

 

 

It's not just the radio-button. Debugging the code, the program sets the file to be open input, You would need to set it to be Open IO. Also, the menu program initially has the RW button as disabled

CALL "W$MENU" USING WMENU-ADD, SUB-HANDLE-1, 0, W-DISABLED, "Read/&Write", MENU-OPEN-IO


It's not just the radio-button. Debugging the code, the program sets the file to be open input, You would need to set it to be Open IO. Also, the menu program initially has the RW button as disabled

CALL "W$MENU" USING WMENU-ADD, SUB-HANDLE-1, 0, W-DISABLED, "Read/&Write", MENU-OPEN-IO

Hello,

I'm not sure if you managed to modify your Alfred.cbl   so that it will when you select a file go straight into [RW}  mode  but is is really easy to do so by making only 2 changes :

1.  at line 1589 of alfred.cbl  :
             get-file-info.
             *** keynum = -1 causes open-file-input to not find the first record
                   move -1 to key-num.
                  perform open-file-io     <== enter this instead of the line below!!
              *   perform open-file-input.

2.  at line 1708 of alfred.cbl

            *** Get the access key. I think this can be mostly xfd-independent now....
            get-access-key.
                    perform open-file-io.    <== enter this instead of the line below!!
            *        perform open-file-input.
                   if file-pointer = null
                        perform shutdown

Save alfred.cbl  and compile and run it and you will see that it opens after you selected a file in [RW]  mode and not [RO] anymore.

best regards,

Piet


I have finally got Alfred to compile on our system with the help from M/F. I need help with a modification I want to do. I want the RW button on to be the default rather than the RO button. I have took a look but can not figure out where to make the modification.

 

 

Testing to see if this account will post messages, please disregard, thanks.


Testing to see if this account will post messages, please disregard, thanks.

Hi,

Did you have a chance to test my  suggested solution?

Best regards,

Piet


Hi,

Did you have a chance to test my  suggested solution?

Best regards,

Piet

Yes I found where to correct this.