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

The replacement of tally while the field is in summary


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

New User


Joined: 28 Apr 2006
Posts: 14

PostPosted: Fri Mar 16, 2007 5:39 pm
Reply with quote

Hi All,

I have the problem like.

I have to put the count of a field which is numeric
earlier the structure of the inout file was as follows

30 abc
40 def
50 ghi

now as a maintenance I have included few more records to the inout file.
IN the earlier report from the easytrieve program the count of first coulumn was coming by the tally keyword in easytrive program now as the new file in which a few dummey records have been added should not increase the count of the first coulumn field.
So I have put a manukla check and incremented the count field.
The problemm is there as the report is a control break report and the summary keword has restriction that the field should be declared as a decinal places to get used in summary in the control breaked report.
I have declared the variable like
count 3 p 2
and the final report count is coming like 1.00,2.00 which is a bit confusing as they should be like 1,2 etc..
Let me know what can be done in this case?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 5:47 pm
Reply with quote

You could move count to another defined field such as
count-no-dec w 3 p 0.....
And then again, a mask might solve the problem without the move, have you checked your manual?
Back to top
View user's profile Send private message
ratn006

New User


Joined: 28 Apr 2006
Posts: 14

PostPosted: Fri Mar 16, 2007 6:08 pm
Reply with quote

dear William,
I just forgot to put that I have tried out to move the decimal field to a numeric field in that case when my report was displaying the totals of the field in report by the summary field no count was geting diaplayed but the same values were geting diaplayed by puting the displays.
I tried to mask the value by zzzv99 and zzzz9 it didnt worked out in the count total.
after almost all the trials the only solution was defined variable like 3 p 2 and get the count like 1.00,2.00 any suggestion
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 6:49 pm
Reply with quote

ratn006 wrote:
I just forgot to put that I have tried out to move the decimal field to a numeric field in that case when my report was displaying the totals of the field in report by the summary field no count was geting diaplayed but the same values were geting diaplayed by puting the displays.
Could you please repeat what you are saying here, more slowly with line breaks where one thought ends and the next one starts please?
Back to top
View user's profile Send private message
ratn006

New User


Joined: 28 Apr 2006
Posts: 14

PostPosted: Sun Mar 18, 2007 11:42 am
Reply with quote

Dear William,

Probably my problem is clear to you.
a)In the existing report by the Easytrieve program the count of number of candidates(its just a name of the fields) was coming from the tally keyword.
b)The input file for this program was suppose having 10 records.
c)Its a before break report means based on some control fields defined in the count and details will be displayed in the report.
My scope starts as follows
d)Now my scope was to make a new report.
e)The input file to my report program the merged file(means the file which was having 10 records and a new file which is coming from differenet cobol program).
f)The purpose of the new report was like that that the count of the candidates should not increase.
g)Hence the new report should be showing all the count as it was showing in the existing report in which tally was used to count the candidates.
h)I cant use tally for counting candidates as it will count the new dummy records also which is not at all required.
i)here by dummy means those records which are coming from cobol program.
j)Hence I have delared my working storage variable to put a manual count of the loans.for not counting my dummy records I verified a control firld in the IF statement which was good enough to verify.
k)The problem comes that once tally is no more and the count of the candidates in in heading field of the report and the count comes based on a control field in the before break report.
l)the manual says that the Summary keyword field mst be having the decimal places.
m)If I am going to define my working storage count field as numeric the summary is not showing anything in the report but the count was turning up properly this I verified by puting displays.
n)finally I declared the count field like 3 p 2 now it was working fine I mean summary was showing up the count but the problem was that the count was coming like 0.00,1.00,2.00.
o)Here the count 0.00 is for my dummay records which is coming from my if condition.
p)Just to add that I already tried out the solution sugested by you that is moving decimal count to nymeric count and then trying up this field in the report.the result of this was same that in the report nothing was geting displayed for the count but this variable was turing up in the display!

I have tried best to put down my words let me know if some clarification is required
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: Sun Mar 18, 2007 11:31 pm
Reply with quote

Hello,

It will be helpful if you show some sample records and what should happen as they are processed. Please show some input (like to what you posted eariler) and what the outputs will be - both data and report.

With that information, we will be better able to help.
Back to top
View user's profile Send private message
ratn006

New User


Joined: 28 Apr 2006
Posts: 14

PostPosted: Mon Mar 19, 2007 9:01 am
Reply with quote

Dear D Sch,

I am trying to produce some records

branch number of students fee college
CS 10 100 abc
CS 20 200 cde
EC 10 100 dfg
EC 20 300 ijk

Now suppose the purpose of the earlier report was to get all the number of students under a particular branch regardless of the college at the same time the total of fee was also required.
so the report will come like
This breaking will be as total CS students are 10+20 for college abc and cde and the total fee comes 100+200
and the similar for EC also(here the total number of students are coming by tally keyword.Before break proc is used.

CS 30 300
EC 30 400

Now for report the input file is like

branch number of students fee college
MC 0 0 0
IT 0 0 0
CS 10 100 abc
CS 20 200 cde
EC 10 100 dfg
EC 20 300 ijk

you can say the first two records are some records which have not been started out those I am using dummy records and the user is interested to get the same report but this should not increase any actual field length.
means
the report should be like
The first field is branch second is total students nad the third is fee
MC 0 0
IT 0 0
CS 30 300
EC 30 400
Here the point is that for counting the sudents I am using my self declared working storage variable now as the report field are in Summar keyword of Easytrieve so seems some limitations are there that I have to declare the ocunt like 3 p 2 then only it will turn up in the heading in line 1 of the report.
so my count is coming like 0.00,30.00 and rest amount fields are coming up fine like 0,300,400.
But the count for total number of students is confusing as they are turing up like 30.00,0.00
Probably now I am clear with my problem,thanks
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 Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top