MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suppress quantitative fields in an Easytrieve report

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
jmateo
Beginner


Joined: 17 Feb 2006
Posts: 4
Topics: 1
Location: Toronto

PostPosted: Fri Feb 17, 2006 11:42 am    Post subject: Suppress quantitative fields in an Easytrieve report Reply with quote

Hi,

I am writing a report with 2 different input files where the relationship is many-to-one (transaction vs. master). I wanted to make a report from both files where the fields from the master will be printed once only while the transaction fields always should be printed.

My fields from the master file are quantitative with 2 decimal places which cannot be used in CONTROL statement.

Hoping for an Easytrieve solution.

Regards,
Joseph
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Feb 17, 2006 12:05 pm    Post subject: Reply with quote

jmateo,

A sample input and desired output will be helpful.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmateo
Beginner


Joined: 17 Feb 2006
Posts: 4
Topics: 1
Location: Toronto

PostPosted: Fri Feb 17, 2006 2:55 pm    Post subject: Suppress quantitative fields in Easytrieve report Reply with quote

As requested.
Code:

Masterfile
MS-ACCOUNT-NUMBER   01   06  P
MS-GROUP            07   06  P
MS-BALANCE          13   06  P 2     
MS-AMT1             19   06  P 2       
MS-AMT2             25   06  P 2

Transaction File
TX-ACCOUNT-NUMBER   01   06  P
TX-TRAN-ID          07   02  A
TX-AMT1             09   06  P 2
TX-AMT2             15   06  P 2

Desired (SORTED BY MS-GROUP)

LINE 1   MS-ACCOUNT-NUMBER
   MS-BALANCE
   MS-AMT1
   MS-AMT2

LINE 2      TX-TRAN-ID
   TX-AMT1
   TX-AMT2

Sample Output
ACCOUNT/             MS-BALANCE   MS-AMT1/     MS-AMT2/   
TRANID                            TX-AMT1      TX-AMT2   
----------             --------    ---------    -----------   
0000000001            50.00          12.50      25.00                 
   AA                               100.00      25.00
   AB                               150.00      35.00
   AC                               100.00      25.00

0000000002            25.50          10.00      25.00             
   AA                               125.55      25.00
   AB                               300.00      25.00
   AC                               400.00      25.00
GROUP '100' TOTAL                  1175.55     160.00   

0000000003            30.00           15.50     25.00     
   AA                                125.55     25.00   
   AB                                300.00     25.00
GROUP '200' TOTAL                    325.55     50.00
 
Back to top
View user's profile Send private message
jmateo
Beginner


Joined: 17 Feb 2006
Posts: 4
Topics: 1
Location: Toronto

PostPosted: Tue Feb 21, 2006 5:05 pm    Post subject: Suppress quantitative fields in Easytrieve report Reply with quote

Hi Kolusu,

Just wondering if you got a solution to the 'suppress quantitative fields' problem.

Thanks in advance,
Joseph
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Wed Feb 22, 2006 10:34 am    Post subject: Reply with quote

Quote:

Hi Kolusu,

Just wondering if you got a solution to the 'suppress quantitative fields' problem.


jmateo,

I never got a chance to look at your problem. You submitted your sample data late friday evening (EST) and nowadays with my busy schedule I do not wrok on solutions in the evenings. And your topic got lost in the recent topics list over the weekend.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Wed Feb 22, 2006 2:10 pm    Post subject: Reply with quote

I am lost here. I am not sure as to what you want here. If you don't want the decimals in your amount fields you can just move the input fields to a working storage variable defined without decimal places and use that in your report

for ex:

Code:

TX-AMT1             09   06  P 2


now define a working storage variable as follows
Code:

W-TX-AMT            W 06 P 0


and let us say your input file has the 1234.56 for TX-AMT1

now if you code like this

Code:

W-TX-AMT   = TX-AMT1


By doing so W-TX-AMT will only have 1234. Now use this field in your report statement.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nsoudi
Beginner


Joined: 17 Feb 2006
Posts: 1
Topics: 0

PostPosted: Wed Feb 22, 2006 5:46 pm    Post subject: Reply with quote

Kolsu,

As per my understanding, Joseph wants to see the decimal points on the report, but problem is EasyTrieve does not allow him to use that field (with decimal point) in CONTROL statement.
Back to top
View user's profile Send private message
jmateo
Beginner


Joined: 17 Feb 2006
Posts: 4
Topics: 1
Location: Toronto

PostPosted: Thu Feb 23, 2006 4:19 pm    Post subject: Reply with quote

Hi Kolusu,

Yes, NSOUDI is right, I cannot use the quatitative fields in CONTROL statement. I tried using the WS field without the decimal point in the CONTROL statement and at the same time use the real fields in my PRINT statement but does not work. For the meantime, I created an extracted file out of both transaction and master files using Eastrieve then generate the report using both PRINT statement for Master file fields and DISPLAY for transaction fields.

I am just wondering if there is a quick Easytrieve solution that I dont know yet.

Thanks a lot Kolusu for spending time on this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group