IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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: 7309
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: 19244
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: 7309
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

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top