Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: how to update a field in a file according to dup record
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: 1288
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 10:02 am    Post subject: Reply to: how to update a field in a file according to dup r
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 12:28 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 12:59 pm    Post subject:
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    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Wed Nov 21, 2007 1:45 pm    Post subject: Reply to: how to update a field in a file according to dup r
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    Post subject:
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    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 6:28 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Wed Nov 21, 2007 6:56 pm    Post subject: Reply to: how to update a field in a file according to dup r
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 Moderator


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

PostPosted: Wed Nov 21, 2007 11:31 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 8:36 am    Post subject: Reply to: how to update a field in a file according to dup r
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us