Thanks for the quick reponse. I'm not sure I follow you though...
Where you have AAAAA and BBBBB above...what do they refer to?
Here's a better (I hope) explanation as to what I'm after....
a) All the records have a policy number in position 1 (see row A)
b) Some records also have an 'old' policy number (which has it's own original record) in position 143 (see row B)
Position 1-------------------------------143
A 654654654<-------------------------->..................<--------------------------
B 987987987<-------------------------->654654654<--------------------------
The example shown above may be repeated e.g. 1000 times. Therefore I want to pull those 2000 records.
If 2) is a problem for you, you need to give us more details about what your records look like with respect to duplicate new/old policy numbers. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Frank Yaeger, thanks for that heads-up but the scenario you posted won't occur (thankfully).
Kolusu, thanks...that Synctool solution worked !!!!
However, now I've got a change requested to the task and judging by what you said about my system not supporting the Icetool, I think I'm outta luck.
I now need to select records from the file based on certain criteria which I can pull using Fileaid
(eg:
$$DD01 USER SELECT=10,IF=(220,EQ,C''AA1''),',
WRITE=OUTPUT5,OUT=25')
However, on selecting the required records. I also need to get their original record (if they have one!)
So, if the statement above returns a record like:
987987987<-------------------------->654654654<
then I need to also extract
654654655<-------------------------->
can the Synctool cope with this by doing the same as before but using 2 files.
The master file and the file of results returned from the USER command.
So if this is returned from the USER command
987987987<-------------------------->654654654<
then pull this from the master
654654655<-------------------------->
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed May 03, 2006 7:42 am Post subject:
youtalkintome,
Based on your sysout messages you have the latest version of syncsort which supports the JOIN feature. Check this topic which shows an example of matching 2 files and getting the desired records
Ok, I used the following code but got an empty file after a successful completion which leads me to my parameters for the OUTREC or the OUTFIL commands ??
Quote:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DISP=SHR,DSN=BXRL25.WBQ.MCP570.REINS.TEST.CONVERT
//IN2 DD DISP=SHR,DSN=BXRL25.WBQ.MCP570.REINS.ORIGS.CONV
//OUT12 DD DSN=BXRL25.WBQ.MCP570.REINS.TEST.FILE,
// DISP=(MOD,CATLG,DELETE),UNIT=DASD,
// RECFM=FB,LRECL=400,BLKSIZE=0,AVGREC=K,
// SPACE=(400,(1600,400),RLSE),
// LABEL=RETPD=400
//OUT1 DD SYSOUT=* NAMES IN FILE1 ONLY
//OUT2 DD SYSOUT=* NAMES IN FILE2 ONLY
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),
//** USE MOD FOR T1
// DISP=(MOD,PASS)
//TOOLIN DD *
//
* ADD '11' IDENTIFIER FOR FILE1 RECORDS.
COPY FROM(IN1) TO(T1) USING(CTL1)
//
* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
COPY FROM(IN2) TO(T1) USING(CTL2)
//
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
SPLICE FROM(T1) TO(OUT12) ON(1,400,CH) WITH(403,1) -
USING(CTL3)
/*
//CTL1CNTL DD *
* MARK FILE1 RECORDS WITH '11'
OUTREC FIELDS=(1,400,402:C'11')
/*
//CTL2CNTL DD *
* MARK FILE2 RECORDS WITH '22'
OUTREC FIELDS=(1,400,402:C'22')
/*
//CTL3CNTL DD *
* WRITE MATCHING RECORDS TO OUT12 FILE. REMOVE ID.
OUTFIL FNAMES=OUT12,INCLUDE=(402,2,CH,EQ,C'12'),OUTREC=(1,400)
* WRITE FILE1 ONLY RECORDS TO OUT1 FILE. REMOVE ID.
* OUTFIL FNAMES=OUT1,INCLUDE=(12,2,CH,EQ,C'11'),OUTREC=(1,10)
* WRITE FILE2 ONLY RECORDS TO OUT2 FILE. REMOVE ID.
* OUTFIL FNAMES=OUT2,INCLUDE=(12,2,CH,EQ,C'22'),OUTREC=(1,10)
/*
My TOOLMSG for this step is
Quote:
SYT000I SYNCTOOL RELEASE 1.4D - COPYRIGHT 2003 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED
SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 0
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed May 03, 2006 11:38 am Post subject:
Quote:
Ok, I used the following code but got an empty file after a successful completion which leads me to my parameters for the OUTREC or the OUTFIL commands ??
I'm confused now !!
youtalkintome,
*Sigh* How do you expect us to help you without looking at your data ? How am I supposed to read your mind as to what output are you expecting?
One more thing , I showed you example to compare 2 files and get the matched records using JOIN feature and you come back with a different solution even after knowing that your version of syncsort does NOT support all the features of ICETOOL. You are just wasting my time as well as your time.
I don't mean to waste your time. I'm trying everything to get this solution.
I read the thread on the Join that you posted but that merges 2 records from 2 files into one larger record in one file.. I want the 2 records still separate in one file.
I thought you understood what I was after.
Apologies for the confusion.
Does this help?
Code:
File A (input)
12345678aaaabbbbccccddddiiiikkkkjjjjeee luejdnsuhhheeeed
38874869hhhheeeeyyyyyssssooooiiiieeesff hfgfyrhekjhkhjkj
56473863ffffccccsssseeeewwwwfcvghbgfnjk hytrfdewsaqwsxza
24353738hhhheeeeyyyyyssssooooiiiieeesff45857458kfjrudshytgtsgsh
File B (input)
29282726ghgsdalkjdaliujhnmbsadhsiudyiuy12345678skjhsduyeiuygytg
File C (Expected output)
29282726ghgsdalkjdaliujhnmbsadhsiudyiuy12345678skjhsduyeiuygytg
12345678aaaabbbbccccddddiiiikkkkjjjjeee luejdnsuhhheeeed
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu May 04, 2006 10:11 am Post subject:
Quote:
I read the thread on the Join that you posted but that merges 2 records from 2 files into one larger record in one file.. I want the 2 records still separate in one file.
youtalkintome,
What makes you think that the Join feature can NOT write 2 seperate records?
Run this step as is and see the output for match dd
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum