Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Spaces instead of zeroes in Totaled field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Spaces instead of zeroes in Totaled field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Fri Feb 14, 2014 3:58 pm    Post subject: Reply to: Spaces instead of zeroes in Totaled field
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

Site Director


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

PostPosted: Fri Feb 14, 2014 8:26 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Fri Feb 14, 2014 10:48 pm    Post subject: Reply to: Spaces instead of zeroes in Totaled field
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us