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

Need comma delimiter in Total line Easytrieve


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

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Wed May 18, 2011 7:46 pm
Reply with quote

Hi Bill,

Thanks for catching my mistake. I changed it to POS and it worked.

Thanks again.

But I have a issue at the end of the report.
Code:


SUMMARY TOTAL                                                                 ;        529.560;            1,156 ;           558.59 ;
PRODUCT TOTAL                                                                 ;        529.560;            1,156 ;           558.59 ;
POLICY  TOTAL                                                                 ;        770.260;            1,329 ;           797.13 ;
                                                                                       862.250             1,507             886.41


But Bill I want my last line to be printed like
Code:


SUMMARY TOTAL                                                                 ;        529.560;            1,156 ;           558.59 ;
PRODUCT TOTAL                                                                 ;        529.560;            1,156 ;           558.59 ;
POLICY  TOTAL                                                                 ;        770.260;            1,329 ;           797.13 ;
FINAL   TOTAL                                                                 ;        862.250;            1,507 ;           886.41 ;


I want to print FINAL TOTAL and semi colon in my last line.

Please advise
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: Wed May 18, 2011 7:59 pm
Reply with quote

Add another test for LEVEL EQ 4, should get the FINAL
Back to top
View user's profile Send private message
tapas84

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Wed May 18, 2011 9:06 pm
Reply with quote

Hi Bill ,

I put condition for LEVEL 4 , and I am getting the report like

Code:


REPORT

UMMARY TOTAL                                                               ;        529.560;            1,156 ;           558.59 ;
PRODUCT TOTAL                                                               ;        529.560;            1,156 ;           558.59 ;
POLICY TOTAL                                                                ;        770.260;            1,329 ;           797.13 ;
FINAL TOTAL                                                                 ;        862.250;            1,507 ;           886.41 ;
                                                                                     862.250             1,507             886.41



Here I am writing FINAL TOTAL 2 times and POLICY TOTAL amount is overridden by FINAL TOTAL data.

LEVEL 4 is not working for my case.

Please advise.
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: Wed May 18, 2011 9:38 pm
Reply with quote

On your CONTROL statement, you have to include FINAL NOPRINT when you don't want the print. So CONTROL FINAL NOPRINT POLICY NOPRINT etc, still nicely formatted.
Back to top
View user's profile Send private message
tapas84

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Thu May 19, 2011 1:19 pm
Reply with quote

Hi Bill,

Thanks a lot it worked for me and I am getting correct report.

Just for my learning , could you please explain me what is the use of POS.

I am not familiar with POS parameter and my case why my first POS is coded as POS 08

why not POS 01.

Thank you again.
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: Thu May 19, 2011 2:50 pm
Reply with quote

Code:


LINE 01 +
          LINE-ITEM-1 +
          LINE-ITEM-2 +
          LINE-ITEM-3 +
          LINE-ITEM-4 +
          LINE-ITEM-5 +
          LINE-ITEM-6 +
          LINE-ITEM-AMT


In the above you have six line items, say names, dates, whatever, and one field which Easytrieve is going to keep a total of (by default, it will SUM anything on the LINE which has decimal places (even zero decimal places, if explicitly defined).

Now, in a report procedure, I want to put some comment and the total. I want the comment under LINE-ITEM-3 and the total under LINE-ITEM-AMT.
So, I use POS 3 (the third position on the LINE statements) and POS 7 (the seventh position).

In your program, we got up to POS 8 so quickly, because of all the delimiters. If you reduce the POS by one and run again, you'll see the totals trying to line up with a delimiter. Now you have it, practice.
Back to top
View user's profile Send private message
tapas84

New User


Joined: 12 Mar 2009
Posts: 23
Location: Bangalore

PostPosted: Thu May 19, 2011 3:00 pm
Reply with quote

Thank you Bill. I got it.
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
Search our Forums:

Back to Top