Skip to main content

I want my display statements to be put into a file.

I have set up compiler option on the COBOL screen. (I want to create COBOL.DIR but not sure where I should put it)

Here is a complete list of the Additional Directive I have 

DEFAULTBYTE"00"
COMP
NOTRUNC
MF
NOADV
APOST
NOFLAGMIG
NOBOUND
CONVERTPTR
ADDRSV"CURRENT-DATE"
ADDRSV"TIME-OF-DAY"
PERFORM-TYPE"OSVS"
ASSIGN"EXTERNAL"
OUTDD"SYSOUT"
COPYEXT"CBL,COB,CPY"
idxformat"8"
nolist
sql(dbman=odbc)
omf"obj"
P64

Now under the Application Environment, I have SYSOUT pointing to a file. 

With my OUTDD'SYSYOUT' in the compile directives and SYSOUT file I would of expected the displays to be written to my SYSYOUT file but there are not. Is there any other setting that I need to get the display written to my file?

Thanks

I want my display statements to be put into a file.

I have set up compiler option on the COBOL screen. (I want to create COBOL.DIR but not sure where I should put it)

Here is a complete list of the Additional Directive I have 

DEFAULTBYTE"00"
COMP
NOTRUNC
MF
NOADV
APOST
NOFLAGMIG
NOBOUND
CONVERTPTR
ADDRSV"CURRENT-DATE"
ADDRSV"TIME-OF-DAY"
PERFORM-TYPE"OSVS"
ASSIGN"EXTERNAL"
OUTDD"SYSOUT"
COPYEXT"CBL,COB,CPY"
idxformat"8"
nolist
sql(dbman=odbc)
omf"obj"
P64

Now under the Application Environment, I have SYSOUT pointing to a file. 

With my OUTDD'SYSYOUT' in the compile directives and SYSOUT file I would of expected the displays to be written to my SYSYOUT file but there are not. Is there any other setting that I need to get the display written to my file?

Thanks

What product version are you using?
This works perfectly for me but it will only work when you are running within the IDE itself. Are you running within the IDE or from the command line?

What type of display statements are you using, simple ones or ones with options on them?

BTW, COBOL.DIR can be placed in the project folder and it will be picked up.


What product version are you using?
This works perfectly for me but it will only work when you are running within the IDE itself. Are you running within the IDE or from the command line?

What type of display statements are you using, simple ones or ones with options on them?

BTW, COBOL.DIR can be placed in the project folder and it will be picked up.

Thanks for the reply

I am using Visual Studio Professional 2022 MF Visual COBOL 8.0

Yes, I am running it from within IDE using Debug.

If I put the COBOL.DIR  in the project folder, will all projects use it?


Thanks for the reply

I am using Visual Studio Professional 2022 MF Visual COBOL 8.0

Yes, I am running it from within IDE using Debug.

If I put the COBOL.DIR  in the project folder, will all projects use it?

No only that particular project will use it as all the projects are separate from one another. If you want to put it in a common location that can be picked up by all projects then use the USE"pathtofile\\COBOL.DIR" directive in each of the projects.

I tested with VS2022 and 8.0 also with your directives and sysout was redirected. I simply ran a test with DISPLAY "This is a test".

Is it by any chance creating a file called SYSOUT?


No only that particular project will use it as all the projects are separate from one another. If you want to put it in a common location that can be picked up by all projects then use the USE"pathtofile\\COBOL.DIR" directive in each of the projects.

I tested with VS2022 and 8.0 also with your directives and sysout was redirected. I simply ran a test with DISPLAY "This is a test".

Is it by any chance creating a file called SYSOUT?

No file called SYSYOUT was created but I created another project and it worked there. So I must have a typo or something. 

Thanks for all your help