Page 2 of 3

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Thu Jun 23, 2011 7:33 am
by Robert Sample
However, the report showed that the second line is not blank but continue print the second Heading even when I change the number of line to 2.
Did you actually print the report, or did you just look at it online?

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Thu Jun 23, 2011 7:45 am
by ang
Hi Robert,

I used Browse command in TSO to view the report.

Thanks.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Thu Jun 23, 2011 7:55 am
by Robert Sample
Are you aware that a report will NOT show blank lines when browsing in TSO as compared to actually printing it? The carriage control character in the first position will not be interpreted to show a blank line while browsing -- but when the report is printed, the carriage control character will take effect.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Thu Jun 23, 2011 8:03 am
by ang
I am not sure whether the first character will be analyzed or not in Browse mode, sorry about that. But what actually confusing me is why when I use BEFORE clause, the blank line will be shown even though not in the right format?

Thanks.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Thu Jun 23, 2011 11:34 am
by BillyBoyo
ang, change your recfm to FBA please. You can check in the JCL manual, but this is for an ANSI printer control character file. When you browse the output you should now see the characters enrico wrote of yesterday,

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Fri Jun 24, 2011 1:12 am
by Ed Goodman
Show us the output, including that first column. I'd bet lunch there is a '-' in column one of line two.

The before/after confusion will make total sense if you think about how they work...just remember that the COBOL program has to work one line at a time. So if you ask it to "put this line out, then make a blank line after it", it will write out a line, then write out a blank line so that the next record won't go there. Remember that it CAN NOT ASSUME what the next record will be.
On the other hand, if you say, "Make a blank line, then write this record", COBOL will know that it can tell the printer to skip a line by putting the '-' in column one, so it puts the data in that line too.

Now, when you LOOK at it online, you see blanks using BEFORE, but no blanks using AFTER. However, if you use your new knowledge to realize that the '-' in column 1 makes magical things happen during printing, you'll see that they will look the same once printed.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Mon Jun 27, 2011 9:31 am
by ang
Using BEFORE clause:


Using AFTER clause:


Hmm...seems nothing in the first column...

All of the blue crud has been deleted. If you post info from a screen, use copy/paste and the Code tag.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Mon Jun 27, 2011 11:03 am
by BillyBoyo
Please don't post images, but copy/paste from your emulator if possible. Don't chop off the screen, so we can be sure of what you are using.

Still no sign of your JCL.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Tue Jun 28, 2011 8:53 pm
by Ed Goodman
Are you aware of the "DISPLAY CC" command in tso? In BROWSE mode, type "DISPLAY CC" and it will show you what's really in column 1.

"DISPLAY NOCC" will hide that column.

If you're not seeing ANYTHING in column 1, then I'm guessing that you have "DISPLAY NOCC" active.

Sorry I didn't get to see your earlier screen prints, that probably would have told me for sure.

One thing I CAN tell you is that it's probably working the way it's supposed to, and you are getting the correct results. It's just a matter of getting you to be able to see and understand it.

Re: Problem with WRITE AFTER ADVANCING

PostPosted: Tue Jun 28, 2011 11:44 pm
by dick scherrer
Hi Ed,

Sorry I didn't get to see your earlier screen prints, that probably would have told me for sure.
Unfortunately what was posted was your basically unreadable IBM 3270 terminal blue. . . on a black background. No carriage control shown "before" or "after".

It would be so easy for ts to simply copy/paste and use the "Code" tag, but as you see, this is not happening. . .

It's just a matter of getting you to be able to see and understand it.
Yup, we'll see. . .

d