Output redirection 
Author Message
 Output redirection

I'm using Microfocus COBOL v3.2.46 on an OS/2 Warp platform and
I just want to redirect a program's DISPLAY statements output to a file
without changing the program itself.  I thought I can do it the usual
way but I was wrong!  

I've tried doing it this way:

   TEST > OUTFILE

where TEST is the COBOL program and OUTFILE is the name of my output file.
The DISPLAY statements printed the lines on my screen instead of redirecting
them to OUTFILE.  Is there something I should do to make it work the way
I want it?

Thanks in advance for any response!

Ferdinand



Fri, 20 Feb 1998 03:00:00 GMT  
 Output redirection

Quote:

> I'm using Microfocus COBOL v3.2.46 on an OS/2 Warp platform and
> I just want to redirect a program's DISPLAY statements output to a file
> without changing the program itself.  I thought I can do it the usual
> way but I was wrong!  

> I've tried doing it this way:

>    TEST > OUTFILE

> where TEST is the COBOL program and OUTFILE is the name of my output file.
> The DISPLAY statements printed the lines on my screen instead of redirecting
> them to OUTFILE.  Is there something I should do to make it work the way
> I want it?

Your environment is alien to me (which is my way of saying that I can't check
this out for you ;) ), but according to the docs on my desk (specifically,
the COBOL System Reference Vol 2), the S5 Run-time switch ($COBSW) should help
you here.

Cheers,
Kev.
--


These views are strictly my own.
I doubt very much that anyone else would want them.



Fri, 20 Feb 1998 03:00:00 GMT  
 Output redirection

Quote:

>I'm using Microfocus COBOL v3.2.46 on an OS/2 Warp platform and
>I just want to redirect a program's DISPLAY statements output to a file
>without changing the program itself.  I thought I can do it the usual
>way but I was wrong!  

>I've tried doing it this way:

>   TEST > OUTFILE

>where TEST is the COBOL program and OUTFILE is the name of my output file.
>The DISPLAY statements printed the lines on my screen instead of redirecting
>them to OUTFILE.  Is there something I should do to make it work the way
>I want it?

You need to do the following first:

    set COBSW=+S5

This works providing you are just using basic DISPLAY statements - i.e. none
of the formatted DISPLAY variants.



Fri, 20 Feb 1998 03:00:00 GMT  
 Output redirection
Have you tried to re-compile the program using the OUTDD compiler
directive? Although I think that this compiler directive is more
specific to the OSVS COBOL dialect. For more information on the
compiler directive, refer to the MFCOBOL System reference vol2.
Good Luck

---
 t 1st 1.11 #6477 t I'm not a programmer but I play one on TV...


Fri, 20 Feb 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Ignoring I/O errors in output redirection

2. Problems with output redirection in gawk

3. RFO: output redirection

4. Command output redirection

5. output redirection within mod_ruby

6. Help about OUTPUT redirection

7. program for output redirection

8. Problem: Results depending on output redirection ?!

9. spawnv output redirection?

10. output redirection with nt

11. output redirection

12. FPS output redirection

 

 
Powered by phpBB® Forum Software