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
 

 

Randomize a/c nos using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Randomize a/c nos using SORT
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    Post subject:
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    Post subject: Re: Randomize a/c nos using SORT
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

Site Director


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

PostPosted: Tue May 15, 2007 10:40 pm    Post subject:
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    Post subject:
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    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 SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm
No new posts Db2 load job abending in SORT mistah kurtz DB2 4 Mon Jun 05, 2017 3:58 pm


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