IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Spaces instead of zeroes in Totaled field


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Fri Feb 14, 2014 2:16 pm
Reply with quote

Hi All,

I am trying to create a report in easytrieve. When the field, which is being totaled, is non zero the report displays the value but when the field is zero the report is printing spaces. I asked one person and he said thats how it works. Is it true, if so is there anyway I can force the program to write zero.
Code:
REPORT OUTPUT1 PRINTER OUTFILE SUMMARY SPREAD
SEQUENCE VAR1 VAR2 VAR3
CONTROL VAR1 NOPRINT VAR3 NOPRINT VAR2
SUM AMOUNT
TITLE 1 WS-REPORT-TITLE
HEADING 'VAR1' VAR1
HEADING 'VAR3' VAR3
HEADING 'VAR2' VAR2
HEADING 'AMOUNT' AMOUNT
LINE VAR1 VAR3 VAR2 AMOUNT


The amount variable is declared as 12 8 N 0

Please let me know, if additional informations are required.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Fri Feb 14, 2014 3:58 pm
Reply with quote

Have a look at MASK and find out from your manual what the default MASK is.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19251
Location: Inside the Matrix

PostPosted: Fri Feb 14, 2014 8:26 pm
Reply with quote

Hello,

Quote:
I asked one person and he said thats how it works.
Consider asking someone else in the future . . .

While that answer is not Wrong, it is not helpful either.

Refer to Bill's note.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7312
Location: Inside the Matrix

PostPosted: Fri Feb 14, 2014 10:48 pm
Reply with quote

One of the most pointless defaults of all time.

With value of zero:
Code:

8 N   => 00000000
8 N 0 =>
(that part intentionally left blank)


saurabh39,

Unless the cunningly-named VAR1, VAR2 and VAR3 have any decimal places (including 0) you don't need the SUM, it will happen automatically.

I never knew you could specify the HEADING like that, I've always put the name first, like in the manual. In fact, usually had them on the data-definitions, either in macros for "copybooks" (so the same field always gets the same heading in any REPORT) or for "storage" fields. Learn something new every day...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts BMS map length field greater than zero CICS 3
No new posts Break a record into fields, each fiel... SYNCSORT 2
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10
No new posts How do i verify the char field is hav... PL/I & Assembler 1
No new posts RPLDDDD field for extended VSAM - ESDS JCL & VSAM 0

Back to Top