Skip to main content

I am trying to use the Environment Statement to replace the Old Wang Putparm VSSubs. Here are the statements I am using. SET ENVIRONMENT compcod to "DB" in the program AR07.txt.  Here is the other ENV. ACCEPT COMPANYCODE FROM ENVIRONMENT "COMPCOD" in AR0710.txt.

When I run the programs Companycode is blank not "DB". I must be doing something wrong but what? Any reference to a Acucobol Manual will help. I have included the programs and just search for compcod and companycode

 

I am trying to use the Environment Statement to replace the Old Wang Putparm VSSubs. Here are the statements I am using. SET ENVIRONMENT compcod to "DB" in the program AR07.txt.  Here is the other ENV. ACCEPT COMPANYCODE FROM ENVIRONMENT "COMPCOD" in AR0710.txt.

When I run the programs Companycode is blank not "DB". I must be doing something wrong but what? Any reference to a Acucobol Manual will help. I have included the programs and just search for compcod and companycode

 

Format 6  of the set statement:  https://www.microfocus.com/documentation/extend-acucobol/103/extend-Interoperability-Suite/BKRFRFPROC00000001S169.html

Format 5 of the accept statement: https://www.microfocus.com/documentation/extend-acucobol/103/extend-Interoperability-Suite/BKRFRFPROC00000001S077.html

 


FILE SECTION.
WORKING-STORAGE SECTION.
77 compcod PIC X(40).
PROCEDURE DIVISION.
Main Section.

SET ENVIRONMENT "compcod" to "DB".
move spaces to compcod.
accept compcod from environment "compcod".
display compcod.
accept omitted.
Exit Program.
Stop Run.


Format 6  of the set statement:  https://www.microfocus.com/documentation/extend-acucobol/103/extend-Interoperability-Suite/BKRFRFPROC00000001S169.html

Format 5 of the accept statement: https://www.microfocus.com/documentation/extend-acucobol/103/extend-Interoperability-Suite/BKRFRFPROC00000001S077.html

 


FILE SECTION.
WORKING-STORAGE SECTION.
77 compcod PIC X(40).
PROCEDURE DIVISION.
Main Section.

SET ENVIRONMENT "compcod" to "DB".
move spaces to compcod.
accept compcod from environment "compcod".
display compcod.
accept omitted.
Exit Program.
Stop Run.

Thanks! Worked perfectly.