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

Randomize a/c nos using SORT


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

New User


Joined: 14 May 2007
Posts: 4
Location: Chennai, India

PostPosted: Tue May 15, 2007 11:02 am
Reply with quote

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
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Tue May 15, 2007 1:54 pm
Reply with quote

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
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Tue May 15, 2007 2:21 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 15, 2007 10:40 pm
Reply with quote

Hello,

Please re-read the origiinal post - the question is about Syncsort not DFSORT.
Back to top
View user's profile Send private message
ssivasub

New User


Joined: 14 May 2007
Posts: 4
Location: Chennai, India

PostPosted: Wed May 16, 2007 12:25 pm
Reply with quote

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
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 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 JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top