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

how to add sequence number to duplicate records using SORT?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
superman

New User


Joined: 28 Mar 2011
Posts: 12
Location: india

PostPosted: Fri Apr 01, 2011 1:17 pm
Reply with quote

I have the below file:

000016 u~;PARLIN ;UNKNOWN
000017 u~;MARKET ;SERVICE@MDINFO.NU
000018 u~;ATTENT ;UNKNOWN
000019 u~;GRAFIX ;INFO@GRAFIX.NL
000020 u~;MARKET ;SERVICE@MDINFO.NU
000021 u~;MARKET ;SERVICE@MDINFO.NU
000022 u~;MARKET ;R.SMITS@VANESHOME.NL
000023 u~;LZ Ows ;SERVICE@MDINFO.NU

Here when I have duplicate records I want to append a sequence nr. of 2 digits to make all the records unique. Can this be done using SORT?

000016 u~;PARLIN ;UNKNOWN
000017 u~;MARKET ;SERVICE@MDINFO.NU
000018 u~;ATTENT ;UNKNOWN
000019 u~;GRAFIX ;INFO@GRAFIX.NL
000020 u~;MARKET01 ;SERVICE@MDINFO.NU
000021 u~;MARKET02 ;SERVICE@MDINFO.NU
000022 u~;MARKET03 ;R.SMITS@VANESHOME.NL
000023 u~;LZ Ows ;SERVICE@MDINFO.NU
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 01, 2011 2:22 pm
Reply with quote

Can you run a dummy sort and post the SYSOUT so we can know which sort product and release level you have installed.

ALSo state the DSORG, RECFM and LRECL of the input / output files.

Key positions, lengths and formats of relevant fields.
Code:

//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
/*
//SORTOUT  DD DSN=&&TEMP01,DISP=(,DELETE,DELETE),
//            SPACE=(TRK,5)
//SYSIN    DD *
 SORT FIELDS=COPY
/*
//
Back to top
View user's profile Send private message
superman

New User


Joined: 28 Mar 2011
Posts: 12
Location: india

PostPosted: Fri Apr 01, 2011 5:07 pm
Reply with quote

Hi,

Please see the below details on running the job.

COMMAND ===> SCROLL ===> SCREEN
******************************* Top of Data ***********************************
SYNCSORT FOR Z/OS 1.3.2.1R U.S. PATENTS: 4210961, 5117495 (C) 2007 SYNCSO
z/OS 1.11.0
SYSIN :
SORT FIELDS=COPY
WER903I SYNCSORT 1.3.2.1 IS NOT LICENSED FOR SERIAL 9FC84, TYPE 2097 736, LPAR
WER903I PRODUCT WILL STOP WORKING IN 40 DAYS UNLESS A VALID KEY IS INSTALLED.
WER108I SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER054I RCD IN 1, OUT 1
WER169I RELEASE 1.3 BATCH 0493 TPF LEVEL 2.1
WER052I END SYNCSORT - CH1676A,STEP01,,DIAG=AE00,604A,82AE,00CE,E652,48C3,86A8
******************************* Bottom of Data ********************************

Details
----------
DSORG= PS
RECFM = FB
LRECL= 30037

The record start position is at length 680 from where the duplicates have to be eliminated.

[/img]
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Duplicate transid's declared using CEDA CICS 3
Search our Forums:

Back to Top