Skip to main content

I am using Visual Cobol for Windows Version 7

I have a Visual COBOL SCREEN SECTION FORM with a number of modifiable fields.

I use the CONTROL clause to dynamically make fields modifiable or protected

When i protect a modifiable field it will still tab to that field.

I have tried setting the ADISCF option "Control of whether protected fields are skipped" to skip (2), but that doesn't seem to have any effect

Is there any way to get ADIS to skip fields if they are protected?

Thanks in advance for any help

I am using Visual Cobol for Windows Version 7

I have a Visual COBOL SCREEN SECTION FORM with a number of modifiable fields.

I use the CONTROL clause to dynamically make fields modifiable or protected

When i protect a modifiable field it will still tab to that field.

I have tried setting the ADISCF option "Control of whether protected fields are skipped" to skip (2), but that doesn't seem to have any effect

Is there any way to get ADIS to skip fields if they are protected?

Thanks in advance for any help

I tested this here and as long as the Protected fields are skipped option is set in ADISCTRL file it does skip the protected field. Is your ADISCTRL file in the same folder as your executable?

Here is my short demo.

       working-storage section.
       01 my-control   pic x(80) value "PROTECT".
       01 ws-field-1   pic x(10).
       01 ws-field-2   pic x(10).
       01 ws-field-3   pic x(10).
       screen section.
       01 my-screen.
          05  pic x(10) value "field-1" line 5 col 5.
          05  pic x(10) line 5 col 15 using ws-field-1.
          05  pic x(10) value "field-2" line 7 col 5 
          05  pic x(10) line 7 col 15 using ws-field-2
               control my-control.
          05  pic x(10) value "field-3" line 9 col 5.
          05  pic x(10) line 9 col 15 using ws-field-3.


       procedure division.

           display my-screen
           accept my-screen

           goback.


I tested this here and as long as the Protected fields are skipped option is set in ADISCTRL file it does skip the protected field. Is your ADISCTRL file in the same folder as your executable?

Here is my short demo.

       working-storage section.
       01 my-control   pic x(80) value "PROTECT".
       01 ws-field-1   pic x(10).
       01 ws-field-2   pic x(10).
       01 ws-field-3   pic x(10).
       screen section.
       01 my-screen.
          05  pic x(10) value "field-1" line 5 col 5.
          05  pic x(10) line 5 col 15 using ws-field-1.
          05  pic x(10) value "field-2" line 7 col 5 
          05  pic x(10) line 7 col 15 using ws-field-2
               control my-control.
          05  pic x(10) value "field-3" line 9 col 5.
          05  pic x(10) line 9 col 15 using ws-field-3.


       procedure division.

           display my-screen
           accept my-screen

           goback.

Fantastic. I was modifying it using the ADISCF utility so i assumed it was changing/accessing that copy. It worked when i copied it into my executable folder.

Thank you very much, i appreciate it