View previous topic :: View next topic
|
Author |
Message |
nigelosberry
New User
Joined: 06 Jan 2009 Posts: 88 Location: Ggn, IN
|
|
|
|
No specific reason.
In the recent past I have seen many progams writing from a WS record area. Specially when there are multiple record types. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
It's rare a "full" listing would be needed -- most of the time, a few lines of DATA DIVISION and a few lines of PROCEDURE DIVISION are enough to resolve the issue. Of course, getting the o/p to post the right few lines of each can be quite a pain .... |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
For our o/p file the DSORG is FBA.
Old programmer here, when a file is defined FBA -- the first byte -- is considered (as was stated above) -- a CARRIAGE CONTROL character. Therefore with the 03 your print lines should show up with one BLANK LINE between each line -- The ZERO in position one is for SKIP A LINE. When I code a print line I allocate ONE EXTRA position in the beginning of the line for the Carriage control.
Remember - this comes from an OLD programmer -- So like all of us -- code the thing yourself and run a few tests to prove what I said is correct or incorredt[/quote] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
ridgewalker50, you also need to take into account whether or not ADV compiler option is being used. I've seen programmers quite puzzled when their 133-byte print line turned into a 134-byte print line due to ADV being used. |
|
Back to top |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
Mr. Sample, I DID forget about that -- I took out the AFTER ADVANCING long ago -- probably (but I cannot remember) because I was one of the ones who was stumped by the 134 characters. Thank you |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm missing something here, if both 02 and 03 are printed using
Quote: |
WRITE PRINT-LINE-T FROM WS-PRINT-LINE-T
AFTER ADVANCING 1 LINES,
|
then it still does not explain why the leading zero in 02 is replaced with a space.
Gerry |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Isn't the space the "after advancing 1" and the zero "after advancing 2"?[/quote] |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Bill,
yes I agree with you
Code: |
CODE ACTION BEFORE PRINTING RECORD
---- -----------------------------
BLANK SPACE 1 LINE
0 SPACE 2 LINES
- SPACE 3 LINES
+ SUPPRESS SPACE
1 SKIP TO LINE 1 ON NEW PAGE
THESE ARE ANSI-DEFINED PRINTER CONTROL CHARACTERS
|
This is from the old reference card.
But if both lines are using AFTER ADVANCING 1 LINES, then both lines should have a blank in position 1 of the output.
Gerry |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes. From the "scattered all over the program" setting of the types I'm assuming that there are a number of writes, rather than one. For such a strange-looking report (which looks really like a download for something, going by tape from the details later supplied) it does seem odd to have different spacing as well. Maybe to check what the default spacing is if you have a mix?
I also like completeness. But we need TS back if he is interested in crossing his eyes and doting over his teas. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Default is 1.
Vidya Kajale, if still there, are there any "...ADVANCING 2"s in your program? Also then, can you confirm that your compile option is NOADV?
Nihal, looks like it is a write from working-storage, if we can trust the data-name on the write. |
|
Back to top |
|
|
Vidya Kajale
New User
Joined: 01 Jun 2010 Posts: 43 Location: India
|
|
|
|
Hi ,
There is no compiler option as ADV or NOADV.
Please find below options in compilation. I am using too, DCCS for compilation.
JOB/PROJECT ===> DBIVIDYA
CENTER ===> CLDC
ELEMENT NAME ===> KZWC380Z
ELEMENT TYPE ===>
CONCATENATIONS: COPYLIBS ========> TEST PREP PROD
INCLUDES ========> TEST PREP PROD
SUBLIBS =========> TEST PREP PROD
PRINT OPTIONS: TWO UP ==========> Y
DB2 PRECOMPILE ==> Y
CICS PRECOMPILE => - NOT-APPLICABLE
XPEDITER COMPILE ================> Y
XPEDITER SYMBOLIC LIB ===========> TVSAMD.T6997VK.XPV2.DDIO__________________
CICS DEBUG COMPILE ===============> - NOT-APPLICABLE
COBOL2 1985 STANDARD =============> N NOT-APPLICABLE
STROBE COMPILE ===================> N
DB2 EXPLAIN ===================> _
COMPILE PROCEDURE USED =========> CEXXDXXX
BIND PARMETERS BEING USED ======> TEST
Is there any rule in mainframe that when we try to print numeric value as fist digit in our o/p file it it voilates its first digit?[/code] |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Vidya Kajale wrote: |
Is there any rule in mainframe that when we try to print numeric value as fist digit in our o/p file it it voilates its first digit?
|
Yes and no.
You are using AFTER ADVANCING when you WRITE. First byte of your record is therefore a "carriage control" character. You have not allowed for this, so you are loosing your first character (which happens to be numeric, but could have been absolutely anything).
Read through the posts. Read the Cobol manuals, look at the JCL manual as well (FBA/VBA for Recfm).
Do you have AFTER ADVANCING 2 also in your program? If not, we're not yet clear about the behaviour of your "0" in "03". |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You can't not have ADV and not have NOADV. It is like a switch, it can't be neither on nor off (OK, switch analogy can break down if you actually find the "balancing point", but you know what I mean). Look at the list of Options in the Compile listing. Don't just pick on something that has the word Options in it and say "no". |
|
Back to top |
|
|
Vidya Kajale
New User
Joined: 01 Jun 2010 Posts: 43 Location: India
|
|
|
|
we dont have any compile listing option..
Its auto listing... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Vidya Kajale wrote: |
we dont have any compile listing option..
Its auto listing... |
I have no idea what you mean.
Do you get a compile listing when you compile your program?
If yes, then look through the listing, line-by-line if you prefer, or by searching for "Options in effect" or something like that. Then look down to see if you can see NOADV/ADV (it should be the second option, or thereabouts). |
|
Back to top |
|
|
Vidya Kajale
New User
Joined: 01 Jun 2010 Posts: 43 Location: India
|
|
|
|
i found in jobdetails in SYSPRINT by searching for "Options in effect"
Code: |
Options in effect:
NOADATA
NOADV
APOST
ARITH(COMPAT)
AWO
NOBLOCK0
BUFSIZE(31744)
NOCICS
CODEPAGE(1140)
NOCOMPILE(S)
NOCURRENCY
DATA(31)
NODATEPROC
NODBCS
NODECK
NODIAGTRUNC
NODLL
|
How will i set it to ADV. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
A good way is to check in the manuals about how to set compiler options. Also look it up, and see what it does. When someone gives you a gun and suggests you pull the trigger, check what it is loaded with first.
One way is CBL ADV as first line in your program (or anywhere before procedure division if you want no-one to be able to find it easily). Check in the manual about what columns are OK, or just try it. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
man, forget the options stuff, it will take another week to educate the ts on compiler options.
just, simply do 1 of 2 things:- remove 'after advancing' from your WRITE statement
- extend you output record 1 char, and do not put anything in the 1st character.
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to get permission BEFORE modifying any of the compiler options. . .
Some places will not accept code that has changes to the "standard" compiler options for promotion.
Suggest you do as DBZ suggests. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Yes, sorry. Topic dragging on so long, I forgot that we were only asking what it was set to originally.
Hopefully this is the end, and the outstanding question about AFTER ADVANCING 2 can continue to be ignored if TS gets output that is wanted. |
|
Back to top |
|
|
|