duplicate records count

Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool
meena
Posts: 11
Joined: Sat Oct 22, 2011 11:59 am
Skillset: cobol,jcl,cics,db2
Referer: while searching some conditions for eztrieve in net i found this interesting forum

duplicate records count

Postby meena » Sat Oct 22, 2011 8:16 pm

hi all
my i/p file looks like:
5eeeeeeeeeee 111010
6sthyjdtbbk888888kkkkkkkk
6dfuyhhhhhhhhhhhhhhhhhhhhh
6 tfxbvyhfjguifyoyioiui
54444444444444444 111010
6sdysryhrsj
5222222222222 110909
5rrrrrrrrrrr 110909
5fdddddd 111212

v shld arrang date col of rows starting with '5' and count of similar dates shld be displayed aside.
my o\p shuld looks lik:
111010 2
110909 2
111212 1


my report prt is:
report.......
sequence ws-date
control ws-date
heading..
titile..
line..

but my o/p looks like;
111010

111010 2
110909

110909 2
111212
111212 1


what shld i do.......

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

Re: duplicate records count

Postby BillyBoyo » Sat Oct 22, 2011 9:29 pm

You haven't shown us any data definitions or code. Since your report dates are not sequenced, I guess WS-DATE is not getting set correctly.
We also need to see your report definition.

meena
Posts: 11
Joined: Sat Oct 22, 2011 11:59 am
Skillset: cobol,jcl,cics,db2
Referer: while searching some conditions for eztrieve in net i found this interesting forum

Re: duplicate records count

Postby meena » Sat Oct 22, 2011 9:55 pm

hi billyboyo,
in records starting with '5' the date fields will be located in col 70-75......


i think its set in ws-date but
my o/p looks like

111010

111010 2
110909

110909 2
111212
111212 1
which means for the date 111010 which occurs 2 times so it prints one time,one space gives total in 3rd line ll'ly for other dates happening......i just want to neglect space and print once along with total.....


my code looks lik tis:
FILE INFILE
IN-REC 1 80 A
in-part1 1 1 n
in-part2 2 68 a
in-part3 70 6 n
in-part4 76 4 a

ws-part1 w 1 n
ws-part3 w 6 n
JOB INPUT infile

move in-part1 to ws-part1
if ws-part1=5
print
go to job
else
go to job
end-if


report .......
sequence in-part3
control in-part3
heading..
title..
line in-part3 tally

meena
Posts: 11
Joined: Sat Oct 22, 2011 11:59 am
Skillset: cobol,jcl,cics,db2
Referer: while searching some conditions for eztrieve in net i found this interesting forum

Re: duplicate records count

Postby meena » Sat Oct 22, 2011 10:05 pm

plz also tel can we do tis using simple sort if so chk my code whether tis is correct,,,

//step1 exec pgm=sort
//sysout dd sysout=*
//sortin dd dsn=i/p file
//sortout dd dsn=o/p file
//sysin dd *
sort fields=(70,6,zd,a)
include cond=(1,1,ch,eq,c'5')
outfil removecc ,nodetail,
sections=(70,6,
trailer3=(70,6,count=(m10,length=3)))
/*

i just wrote tis with watever i learnt i didnt chk tis but just will this satisfy my requirement..

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

Re: duplicate records count

Postby BillyBoyo » Sun Oct 23, 2011 1:44 am

You still haven't shown all the report definition.

However, try to check on SUMMARY option, which will suppress the detail line. You can also tell different levels of control-break not to print. If you don't want a final total, on your CONTROL you should look at how to put FINAL NOPRINT.

I don't understand how you can get this order

111010
110909
111212

for your dates after sequencing them.

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

Re: duplicate records count

Postby BillyBoyo » Sun Oct 23, 2011 1:46 am

At a glance your Sort code looks OK, but I don't even know which Sort product you use. There are both DFSORT and SYNCSORT forums here, so you could post there as appropriate to stand a better chance of getting an answer.

meena
Posts: 11
Joined: Sat Oct 22, 2011 11:59 am
Skillset: cobol,jcl,cics,db2
Referer: while searching some conditions for eztrieve in net i found this interesting forum

Re: duplicate records count

Postby meena » Sun Oct 23, 2011 7:43 am

hi
i got the result in sorted order for the easytrieve... ok let me try with the summary option u told.......

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: duplicate records count

Postby dick scherrer » Sun Oct 23, 2011 8:44 am

Hello,

what shld i do.......


You should never post the same question in multiple forums. . .

This is locked. The other duplicate has been deleted.

d


  • Similar Topics
    Replies
    Views
    Last post