|
View previous topic :: View next topic
|
| Author |
Message |
ssivasub
New User
Joined: 14 May 2007 Posts: 4 Location: Chennai, India
|
|
|
|
Hi
The input file would be having account numbers and we need to randamize the accounts from the input file, i.e, the 1st account from the input file should be written into 1st file, 2nd account should be written into 2nd file...and so on till 10th account no....and 11th account should in 1st file and 12th account in 2nd file..so on.
The input will be record length of 4000 and the file would be like :
A00000001AAAA.......
A00000001BBBB.......
A00000001CCCC.......
A00000001DDDD.......
A00000001EEEE.......
A00000001FFFF.......
A00000002AAAA.......
A00000002BBBB.......
A00000002CCCC.......
A00000003AAAA.......
A00000003BBBB.......
A00000004AAAA.......
The account number A00000001details would consists of AAAA,BBBB,CCCC and so on till FFFF. So all records of acc no A00000001 should be written into 1st file, all records of A00000002 written to 2 nd file and so on..
Can we do this using a SYNCSORT?
Kindly anybody can help us in giving the format for the above requirement in sort cards. |
|
| Back to top |
|
 |
ParagChouguley
Active User
.jpg)
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi,
I tried doing this with DFSORT. If you too can use the same, here is your sortcard !!
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OFILE1,SAMPLE=10,STARTREC=1
OUTFIL FNAMES=OFILE2,SAMPLE=10,STARTREC=2
OUTFIL FNAMES=OFILE3,SAMPLE=10,STARTREC=3
OUTFIL FNAMES=OFILE4,SAMPLE=10,STARTREC=4
OUTFIL FNAMES=OFILE5,SAMPLE=10,STARTREC=5
OUTFIL FNAMES=OFILE6,SAMPLE=10,STARTREC=6
OUTFIL FNAMES=OFILE7,SAMPLE=10,STARTREC=7
OUTFIL FNAMES=OFILE8,SAMPLE=10,STARTREC=8
OUTFIL FNAMES=OFILE9,SAMPLE=10,STARTREC=9
OUTFIL FNAMES=OFILE10,SAMPLE=10,STARTREC=10
/* |
|
| Back to top |
|
 |
ParagChouguley
Active User
.jpg)
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi,
Here is one more way with DFSORT !
| Code: |
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(OFILE1,OFILE2,OFILE3,OFILE4,OFILE5,
OFILE6,OFILE7,OFILE8,OFILE9,OFILE10),SPLIT
/*
//
|
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please re-read the origiinal post - the question is about Syncsort not DFSORT. |
|
| Back to top |
|
 |
ssivasub
New User
Joined: 14 May 2007 Posts: 4 Location: Chennai, India
|
|
|
|
Hi Parag,
Thanks for your response.
The i/p file is in the below format. We want the o/p should be all the records of A00000001 to Ist file. Then all records of A00000002 in 2nd file. Similarly 10 accts need to spiltted to 10 o/p files. Then 11th acct should be in 1st file, 12th acct in 2nd file and so on..
I beleive your cntlcard does not satisfy the conditions. Pls advise.
A00000001AAAA.......
A00000001BBBB.......
A00000001CCCC.......
A00000001DDDD.......
A00000001EEEE.......
A00000001FFFF.......
A00000002AAAA.......
A00000002BBBB.......
A00000002CCCC.......
A00000003AAAA.......
A00000003BBBB.......
A00000004AAAA....... |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|