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 add sequence number to duplicate records using SORT?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to add sequence number to duplicate records using SORT?
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 01, 2011 2:22 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm


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