Skip to main content

[archive] override .prd procedures

  • October 27, 2010
  • 3 replies
  • 0 views

[Migrated content. Thread originally posted on 26 October 2010]

Is it possible to edit code in the .prd file and not have acubench generate and delete my code? I would like to perform an IF... ELSE... END-IF type of logic in one of the procedures in the .prd file. I'm thinking that since there are no {bench} tags in there I do not think it is possible.

I know I can override the PERFORM Acu-MAIN-Routine in the .cbl file but it would be better to override only the one procedure in the .prd file.

Ultimately what we would like to do is before the window is displayed/created, set the MODALITY based on linkage. The majority of the time I open the window MODELESS, but there are some cases where I need to open it as MODAL, and the least amount of code (and code maintenance) to get it done is preferable.

Maybe what I want is impossible and I just need to create two versions of my program, one MODAL and one MODELESS...

3 replies

[Migrated content. Thread originally posted on 26 October 2010]

Is it possible to edit code in the .prd file and not have acubench generate and delete my code? I would like to perform an IF... ELSE... END-IF type of logic in one of the procedures in the .prd file. I'm thinking that since there are no {bench} tags in there I do not think it is possible.

I know I can override the PERFORM Acu-MAIN-Routine in the .cbl file but it would be better to override only the one procedure in the .prd file.

Ultimately what we would like to do is before the window is displayed/created, set the MODALITY based on linkage. The majority of the time I open the window MODELESS, but there are some cases where I need to open it as MODAL, and the least amount of code (and code maintenance) to get it done is preferable.

Maybe what I want is impossible and I just need to create two versions of my program, one MODAL and one MODELESS...
Your code should not be in the prd at all, your code should be added to the evt file. You can have AcuBench generate the program and not generate a prd - AcuBench - Tools - Options - Generate Code

[Migrated content. Thread originally posted on 26 October 2010]

Is it possible to edit code in the .prd file and not have acubench generate and delete my code? I would like to perform an IF... ELSE... END-IF type of logic in one of the procedures in the .prd file. I'm thinking that since there are no {bench} tags in there I do not think it is possible.

I know I can override the PERFORM Acu-MAIN-Routine in the .cbl file but it would be better to override only the one procedure in the .prd file.

Ultimately what we would like to do is before the window is displayed/created, set the MODALITY based on linkage. The majority of the time I open the window MODELESS, but there are some cases where I need to open it as MODAL, and the least amount of code (and code maintenance) to get it done is preferable.

Maybe what I want is impossible and I just need to create two versions of my program, one MODAL and one MODELESS...
Your code should not be in the prd at all, your code should be added to the evt file. You can have AcuBench generate the program and not generate a prd - AcuBench - Tools - Options - Generate Code

[Migrated content. Thread originally posted on 26 October 2010]

Is it possible to edit code in the .prd file and not have acubench generate and delete my code? I would like to perform an IF... ELSE... END-IF type of logic in one of the procedures in the .prd file. I'm thinking that since there are no {bench} tags in there I do not think it is possible.

I know I can override the PERFORM Acu-MAIN-Routine in the .cbl file but it would be better to override only the one procedure in the .prd file.

Ultimately what we would like to do is before the window is displayed/created, set the MODALITY based on linkage. The majority of the time I open the window MODELESS, but there are some cases where I need to open it as MODAL, and the least amount of code (and code maintenance) to get it done is preferable.

Maybe what I want is impossible and I just need to create two versions of my program, one MODAL and one MODELESS...
If I do that, is acubench still supposed to generate the code that normally goes into the .prd file? Or am I now required to manually update/add all the procedures that normally get generated into the .prd?

Thanks for your help btw. I also see you can modify this on a Progam by program basis which is nice under the program properties...