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

how to update a field in a file according to dup record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed Nov 21, 2007 9:25 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 10:02 am
Reply with quote

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
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed Nov 21, 2007 11:28 am
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 12:28 pm
Reply with quote

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
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed Nov 21, 2007 12:45 pm
Reply with quote

thank you for your response, Murali.

I tried on two different system, one is ok, but another is not.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 12:59 pm
Reply with quote

Julian,

Quote:
on two different system,

You mean to say on two different MFs icon_question.gif
Back to top
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed Nov 21, 2007 1:12 pm
Reply with 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
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 1:45 pm
Reply with quote

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 icon_smile.gif. 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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 21, 2007 5:35 pm
Reply with quote

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
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed Nov 21, 2007 6:16 pm
Reply with quote

I copied DFSORT load module from one to another, it's ok now.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Nov 21, 2007 6:21 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 6:28 pm
Reply with quote

Dick,

Please follow the post(s) properly. TS had given 'ice104a' which is a dfsort error code.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 21, 2007 6:56 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 21, 2007 11:31 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 8:36 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Nov 22, 2007 9:00 am
Reply with quote

Quote:
Hope its clear now.
Yep icon_razz.gif
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top