From: jmoore on
I have a program that was written in a weird structure. I was
wondering if anyone knew a way to call unix to suppress an error
message if the cobol print file is empty.


SEDC Main 9K:noitems $ run pub/
slaudit
05/25/10 BEGIN SECURITY LIGHT AUDIT 09:19 AM

DO YOU WISH TO RUN THIS PROGRAM? Y/N/S/E
Y
NO QUALIFYING RECORDS FOUND

coblp: empty output, no spoolfile created for

05/25/10 END SECURITY LIGHT AUDIT 09:19 AM

I need to compress the coblp message if the print-file is empty. Any
help would be appreciated. Thank you!
From: jmoore on
On May 25, 9:18 am, jmoore <jmoore...(a)gmail.com> wrote:
> I have a program that was written in a weird structure. I was
> wondering if anyone knew a way to call unix to suppress an error
> message if the cobol print file is empty.
>
> SEDC Main 9K:noitems $ run pub/
> slaudit
> 05/25/10 BEGIN SECURITY LIGHT AUDIT  09:19 AM
>
> DO YOU WISH TO RUN THIS PROGRAM? Y/N/S/E
> Y
> NO QUALIFYING RECORDS FOUND
>
> coblp: empty output, no spoolfile created for
>
> 05/25/10 END SECURITY LIGHT AUDIT  09:19 AM
>
> I need to compress the coblp message if the print-file is empty. Any
> help would be appreciated. Thank you!

Sorry I meant suppress
From: Pete Dashwood on
jmoore wrote:
> On May 25, 9:18 am, jmoore <jmoore...(a)gmail.com> wrote:
>> I have a program that was written in a weird structure. I was
>> wondering if anyone knew a way to call unix to suppress an error
>> message if the cobol print file is empty.
>>
>> SEDC Main 9K:noitems $ run pub/
>> slaudit
>> 05/25/10 BEGIN SECURITY LIGHT AUDIT 09:19 AM
>>
>> DO YOU WISH TO RUN THIS PROGRAM? Y/N/S/E
>> Y
>> NO QUALIFYING RECORDS FOUND
>>
>> coblp: empty output, no spoolfile created for
>>
>> 05/25/10 END SECURITY LIGHT AUDIT 09:19 AM
>>
>> I need to compress the coblp message if the print-file is empty. Any
>> help would be appreciated. Thank you!
>
> Sorry I meant suppress

redirect STDERR to the bit bucket... like this:

SEDC Main 9K:noitems $ run pub/slaudit 2> /dev/null

Pete.


--
"I used to write COBOL...now I can do anything."


From: Doug Miller on
In article <86256pF6niU1(a)mid.individual.net>, "Pete Dashwood" <dashwood(a)removethis.enternet.co.nz> wrote:
>jmoore wrote:
>> On May 25, 9:18 am, jmoore <jmoore...(a)gmail.com> wrote:
>>> I have a program that was written in a weird structure. I was
>>> wondering if anyone knew a way to call unix to suppress an error
>>> message if the cobol print file is empty.
>>>
>>> SEDC Main 9K:noitems $ run pub/
>>> slaudit
>>> 05/25/10 BEGIN SECURITY LIGHT AUDIT 09:19 AM
>>>
>>> DO YOU WISH TO RUN THIS PROGRAM? Y/N/S/E
>>> Y
>>> NO QUALIFYING RECORDS FOUND
>>>
>>> coblp: empty output, no spoolfile created for
>>>
>>> 05/25/10 END SECURITY LIGHT AUDIT 09:19 AM
>>>
>>> I need to compress the coblp message if the print-file is empty. Any
>>> help would be appreciated. Thank you!
>>
>> Sorry I meant suppress
>
>redirect STDERR to the bit bucket... like this:
>
>SEDC Main 9K:noitems $ run pub/slaudit 2> /dev/null

That's going to send *all* his error messages to the bit bucket -- probably
undesirable.
From: Pete Dashwood on
Doug Miller wrote:
> In article <86256pF6niU1(a)mid.individual.net>, "Pete Dashwood"
> <dashwood(a)removethis.enternet.co.nz> wrote:
>> jmoore wrote:
>>> On May 25, 9:18 am, jmoore <jmoore...(a)gmail.com> wrote:
>>>> I have a program that was written in a weird structure. I was
>>>> wondering if anyone knew a way to call unix to suppress an error
>>>> message if the cobol print file is empty.
>>>>
>>>> SEDC Main 9K:noitems $ run pub/
>>>> slaudit
>>>> 05/25/10 BEGIN SECURITY LIGHT AUDIT 09:19 AM
>>>>
>>>> DO YOU WISH TO RUN THIS PROGRAM? Y/N/S/E
>>>> Y
>>>> NO QUALIFYING RECORDS FOUND
>>>>
>>>> coblp: empty output, no spoolfile created for
>>>>
>>>> 05/25/10 END SECURITY LIGHT AUDIT 09:19 AM
>>>>
>>>> I need to compress the coblp message if the print-file is empty.
>>>> Any help would be appreciated. Thank you!
>>>
>>> Sorry I meant suppress
>>
>> redirect STDERR to the bit bucket... like this:
>>
>> SEDC Main 9K:noitems $ run pub/slaudit 2> /dev/null
>
> That's going to send *all* his error messages to the bit bucket --
> probably
> undesirable.

Not if you don't want to see them :-)

He COULD change it to a file name.

Pete.

--
"I used to write COBOL...now I can do anything."


 |  Next  |  Last
Pages: 1 2 3 4
Prev: Acucobol Error 98.13
Next: How to talk like a programmer