Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Writing blank lines in Microfocus Cobol

781 views
Skip to first unread message

Timothy Nicholson

unread,
Jun 3, 1997, 3:00:00 AM6/3/97
to

I have been working with MicroFocus COBOL for about 2 1/2 months now, and I
have ran upon something I have never seen before in my 7 years of COBOL
programming. I have a customer who has converted from DG COBOL to
MicroFocus COBOL. The reports in their system were defined with carriage
control characters in WORKING-STORAGE, but these controls were removed as
part of the conversion. Here is an example:

SELECT PRINTER-FILE ASSIGN TO PRINTER PRINT-FILENAME
ORGANIZATION IS LINE SEQUENTIAL.

FD PRINTER-FILE.
01 PRINTER-RECORD PIC X(133).

01 BLANK-LINE.
*@ 05 FILLER PIC 9(02) COMP VALUE 10.
05 FILLER PIC X(02) VALUE SPACES.

WRITE PRINTER-RECORD FROM BLANK-LINE.

This does not generate a blank line. I even tried WRITE PRINTER-RECORD
FROM SPACES with no luck either. I've spent 5 years working in AcuCOBOL,
and I have never had this problem. Is there no way to make the BLANK-LINE
work? It would save me much grief in having to modify 20 or so programs
manually. I would prefer email responses to ti...@renewal-iis.com (my work
email).

Thanks guys!

--
*********************************************************************Timothy
Nicholson
KF4RTX
Raleigh, NC.

The only thing worse than nostalgia is amnesia - Ravi Zacharias
*********************************************************************

Robert Stinnett

unread,
Jun 4, 1997, 3:00:00 AM6/4/97
to

In article <01bc7072$df54f1c0$897664cf@tnichols> "Timothy Nicholson" <tnic...@nuteknet.com> writes:

>I have been working with MicroFocus COBOL for about 2 1/2 months now, and I
>have ran upon something I have never seen before in my 7 years of COBOL
>programming. I have a customer who has converted from DG COBOL to
>MicroFocus COBOL. The reports in their system were defined with carriage
>control characters in WORKING-STORAGE, but these controls were removed as
>part of the conversion. Here is an example:

>SELECT PRINTER-FILE ASSIGN TO PRINTER PRINT-FILENAME
> ORGANIZATION IS LINE SEQUENTIAL.

>FD PRINTER-FILE.
>01 PRINTER-RECORD PIC X(133).

>01 BLANK-LINE.
>*@ 05 FILLER PIC 9(02) COMP VALUE 10.
> 05 FILLER PIC X(02) VALUE SPACES.

>WRITE PRINTER-RECORD FROM BLANK-LINE.

>This does not generate a blank line. I even tried WRITE PRINTER-RECORD

Why not just use the advancing clause?


WRITE PRINTER-RECORD FROM TRANSACTION-RECORDS
AFTER ADVANCING 2 LINES.

Will insert your blank line lickety-split.

Also, don't forget to reserve a space for the carriage control character if
you haven't done so already.

RLS

BBello5778

unread,
Jun 4, 1997, 3:00:00 AM6/4/97
to

I hope this is what you were trying to do....not sure.

01 BLANK-LINE PIC X(133) VALUE SPACES.

WRITE PRINTER-RECORD FROM BLANK-LINE.

Good luck.

Bosun

BBell...@aol.com
http://members.aol.com/bbello5778/bosun.htm
Programmer/Analyst. Bloomington, IL


Joe Coleman

unread,
Jun 4, 1997, 3:00:00 AM6/4/97
to

I have a vague memory that MF removes trailing blanks from records in
line sequential files. In your situation this would mean a null (?)
record.

Joe.

Timothy Nicholson wrote:
>
> I have been working with MicroFocus COBOL for about 2 1/2 months now, and I
> have ran upon something I have never seen before in my 7 years of COBOL
> programming. I have a customer who has converted from DG COBOL to
> MicroFocus COBOL. The reports in their system were defined with carriage
> control characters in WORKING-STORAGE, but these controls were removed as
> part of the conversion. Here is an example:
>
> SELECT PRINTER-FILE ASSIGN TO PRINTER PRINT-FILENAME
> ORGANIZATION IS LINE SEQUENTIAL.
>
> FD PRINTER-FILE.
> 01 PRINTER-RECORD PIC X(133).
>
> 01 BLANK-LINE.
> *@ 05 FILLER PIC 9(02) COMP VALUE 10.

> 05 FILLER PIC X(02) VALUE SPACES.
>
> WRITE PRINTER-RECORD FROM BLANK-LINE.
>

> This does not generate a blank line. I even tried WRITE PRINTER-RECORD

Jeff Raben

unread,
Jun 5, 1997, 3:00:00 AM6/5/97
to

"Timothy Nicholson" <tnic...@nuteknet.com> wrote:

>SNIP part of the conversion. Here is an example:


>
>
>01 BLANK-LINE.
>*@ 05 FILLER PIC 9(02) COMP VALUE 10.
> 05 FILLER PIC X(02) VALUE SPACES.
>
>WRITE PRINTER-RECORD FROM BLANK-LINE.
>
>This does not generate a blank line. I even tried WRITE PRINTER-RECORD
>FROM SPACES with no luck either. I've spent 5 years working in AcuCOBOL,
>

Do you mean an extra blank line? the COMP value 10 is a line feed in
the world of ASCII.
It is possible without ADVANCING coded, that the leading comp fields
were a way of getting line printed AFTER advancing when that clause
was not available in that release of cobol.

You can still work around. But you will get stepped on by posible
implied BEFORE or AFTER ADVANCING in you WRITES with the comp's
imbedded. GOOD LUCK avoiding some recode.

JR


and stir with a Runcible spoon...

Timothy Nicholson

unread,
Jun 5, 1997, 3:00:00 AM6/5/97
to

Why not add ADVANCING? Time constraints mainly. This project is in need
of completion, and I don't want to take the time to manually change the
programs. Besides, who was the stupid engineer who designed this thing
anyway? Why shouldn't WRITE PRINTER-RECORD FROM SPACES work? That's why I
like AcuCOBOL the most of any COBOL I've used.

Robert Stinnett <nos...@cyberpromo.com> wrote in article
<5n2l7v$qga$1...@news10.gte.net>...


> In article <01bc7072$df54f1c0$897664cf@tnichols> "Timothy Nicholson"
<tnic...@nuteknet.com> writes:
>

> >I have been working with MicroFocus COBOL for about 2 1/2 months now,
and I
> >have ran upon something I have never seen before in my 7 years of COBOL
> >programming. I have a customer who has converted from DG COBOL to
> >MicroFocus COBOL. The reports in their system were defined with
carriage
> >control characters in WORKING-STORAGE, but these controls were removed
as

> >part of the conversion. Here is an example:
>

> >SELECT PRINTER-FILE ASSIGN TO PRINTER PRINT-FILENAME
> > ORGANIZATION IS LINE SEQUENTIAL.
>
> >FD PRINTER-FILE.
> >01 PRINTER-RECORD PIC X(133).
>

> >01 BLANK-LINE.
> >*@ 05 FILLER PIC 9(02) COMP VALUE 10.
> > 05 FILLER PIC X(02) VALUE SPACES.
>
> >WRITE PRINTER-RECORD FROM BLANK-LINE.
>
> >This does not generate a blank line. I even tried WRITE PRINTER-RECORD
>

0 new messages