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
 

 

SYNCSORT - Copy file without sorting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Jun 14, 2008 1:55 pm    Post subject: SYNCSORT - Copy file without sorting
Reply with quote

I need to copy a file to another without sorting but eliminate duplicates to have only unique records in the same order as source file.
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Jun 14, 2008 3:52 pm    Post subject:
Reply with quote

What about SORT manuals !!!!!


So simple as command COPY and option SUM FIELDS ....

Please READ READ READ
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Jun 14, 2008 4:08 pm    Post subject:
Reply with quote

Hi Ped,

As for my knowledge SUM FIELDS works on fields specified on SORT FIELDS command. i have already tried it but in vain.

[img]PRODUCT LICENSED FOR CPU SERIAL NUMBER 38D9F, MODEL 2094 720 LICEN
SYSIN :
SORT FIELDS=COPY 0159001
SUM FIELDS=NONE 0160001
WER276B SYSDIAG= 1346685, 3521787, 3521787, 5678437
WER164B 8,932K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 400K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER050I SUM CONTROL STATEMENT IGNORED
WER108I SORTIN : RECFM=F ; LRECL= 80; BLKSIZE= 80
WER110I SORTOUT : RECFM=F ; LRECL= 80; BLKSIZE= 80
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 292K BYTES USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTIN : EXCP'S=2,UNIT=3390,DEV=225F,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B SORTOUT : EXCP'S=2,UNIT=3390,DEV=205D,CHP=(D0D1D2D3D4D5D6D7,2),VOL=TS
WER416B TOTAL OF 4 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 704, OUT 704
WER169I RELEASE 1.2 BATCH 0453 TPF LEVEL 3.1
WER052I END SYNCSORT - JBNAMEA,STEP060,,DIAG=8200,51C4,AA3D,2877,CBD2,6DCA,2A[/img]
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Jun 14, 2008 4:40 pm    Post subject:
Reply with quote

I am not a great expert in sort, but I just read some documentation and I found this for the benefit ......... of myself

using SYNCTOOL with correct JCL requirements, something like


Code:
 COPY FROM(IN1)  TO(T1)
 SELECT FROM(T1) TO(ON1) ON(1,80,CH) NODUPS


Where IN1 is your input dataset, ON1 your output dataset and T1 an temporary dataset reuse in Select

I am sure there is a better solution, but it is working.

Last remark you are using SYNCSORT and not DFSORT. I am using ICETOOL from IBM.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Jun 14, 2008 4:44 pm    Post subject:
Reply with quote

OK I have to continue to read because here I eliminated all duplicates.

So wait and see
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Jun 14, 2008 4:51 pm    Post subject:
Reply with quote

Thanks Ped for your concern. but ON(1,80,CH) option again sort the records but i don't want to sort the records. i want the output in same order as input. only thing is to have unique records.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Jun 14, 2008 5:11 pm    Post subject:
Reply with quote

OP is using SYNCSORT
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Jun 14, 2008 6:50 pm    Post subject:
Reply with quote

Ok but making a intermediary pass including a sequence number at the end

Code:
//STEPS EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1      DD DISP=SHR,DSN=your.input.file
//T1       DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//ON1     DD DSN=your.output.file,..............
//TOOLIN DD *
SORT FROM(IN1) TO(T1) USING(CTL1)
SORT FROM(T1) TO(ON1) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC FIELDS=(1,80,81:SEQNUM,8,ZD)
  SORT FIELDS=(1,80,CH,A)
  SUM FIELDS=NONE
/*
//CTL2CNTL DD *
  SORT FIELDS=(81,8,ZD,A)
  OUTREC FIELDS=(1,80)
/*


But not tested. Anyway should be OK.
Still my previous remark : it is sample for DFSORT, not sure for SYNCSORT.
Back to top
View user's profile Send private message
charanmsrit

New User


Joined: 25 Oct 2007
Posts: 80
Location: Australia

PostPosted: Sat Jun 14, 2008 10:30 pm    Post subject:
Reply with quote

Great Pierre, it really worked. thanks a ton icon_smile.gif
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Sat Jun 14, 2008 10:32 pm    Post subject:
Reply with quote

You are welcome ... as others said icon_lol.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 -> 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 SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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