View previous topic :: View next topic
|
Author |
Message |
julian123
New User
Joined: 14 Aug 2006 Posts: 25
|
|
|
|
I have a file, the data is disorder. I want to find out all the duplicate records and give them a no. (the record has CH,PD,FI field).
how to realize it?
following is my input
input: (length is 11, last is blank)
aaaaaaaaaa
bbbbbbbbbb
cccccccccc
aaaaaaaaaa
aaaaaaaaaa
bbbbbbbbbb
and output is
aaaaaaaaaa1
aaaaaaaaaa2
aaaaaaaaaa3
bbbbbbbbbb1
bbbbbbbbbb2
cccccccccc1 |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
julian123,
Use this for your requirement.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAAAAAAAAA
BBBBBBBBBB
CCCCCCCCCC
AAAAAAAAAA
AAAAAAAAAA
BBBBBBBBBB
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,10,CH,A)
OUTREC OVERLAY(11:SEQNUM,1,ZD,START=1,INCR=1,
RESTART=(1,10))
/*
|
output:
Code: |
AAAAAAAAAA1
AAAAAAAAAA2
AAAAAAAAAA3
BBBBBBBBBB1
BBBBBBBBBB2
CCCCCCCCCC1
|
|
|
Back to top |
|
|
julian123
New User
Joined: 14 Aug 2006 Posts: 25
|
|
|
|
hi, Aaru, thank you for your suggestion.
I tried it , but the system says 'ICE104A M INVALID INREC OR OUTREC STATEMENT OPERAND'. maybe my dfsort doesn't support 'OUTREC OVERLAY', any other ideas? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Julian,
Quote: |
OUTREC OVERLAY(11:SEQNUM,1,ZD,START=1,INCR= |
I belive Aaru had missed '=' in his step after OUTREC OVERLAY. Include and tyy once again. |
|
Back to top |
|
|
julian123
New User
Joined: 14 Aug 2006 Posts: 25
|
|
|
|
thank you for your response, Murali.
I tried on two different system, one is ok, but another is not. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Julian,
Quote: |
on two different system, |
You mean to say on two different MFs |
|
Back to top |
|
|
julian123
New User
Joined: 14 Aug 2006 Posts: 25
|
|
|
|
two different environments
dfsort version
1. CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 -- OK
2. CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 -- NG |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Murali,
Quote: |
I belive Aaru had missed '=' in his step after OUTREC OVERLAY. Include and tyy once again.
|
No. The syntax is correct and it is working here . I am using syncsort.
julian,
Quote: |
I tried on two different system, one is ok, but another is not. |
The difference is seen as different versions are used in those 2 mainframes. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Aaru
murli is pointing to this statement
Code: |
OVERLAY(11:SEQNUM,1,ZD,START=1,INCR=1, |
You have to place "=" after "OVERLAY" |
|
Back to top |
|
|
julian123
New User
Joined: 14 Aug 2006 Posts: 25
|
|
|
|
I copied DFSORT load module from one to another, it's ok now. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if y'all are so smart and educated with your product, whether it be DFSORT, SYNCSORT or another, the least you could do when you make a post is indicate the the product. Otherwise, you are wasting peoples' time. that is the difference between a professional and 'one who is not'. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Dick,
Please follow the post(s) properly. TS had given 'ice104a' which is a dfsort error code. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
copied DFSORT load module from one to another, it's ok now. |
a Mainframe is NOT a pc...
shuffling programs around is the worst practice to fix problems..
Your libraries content will not be in sync with SMPE info and the next time
somebody is going to apply maintanace to You system, You are going to be
in DEEP s**t |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
two different environments
dfsort version
1. CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 -- OK
2. CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 -- NG
|
You need the Dec, 2004 DFSORT PTF to use OVERLAY. That PTF supports 'OVERLAY(' as well as 'OVERLAY=('. So it appears that your z/OS DFSORT V1R5 version has the Dec, 2004 PTF applied, but your DFSORT R14 version doesn't. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Krisprem,
Quote: |
You have to place "=" after "OVERLAY" |
I have already responded to this question.
Frank Wrote:
Quote: |
That PTF supports 'OVERLAY(' as well as 'OVERLAY=('. |
Hope its clear now. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Quote: |
Hope its clear now. |
Yep |
|
Back to top |
|
|
|