MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

create a file with numbered

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Aug 12, 2010 8:10 am    Post subject: create a file with numbered Reply with quote

Hi,

I want to just create an input file for testing which should contain first 6 bytes of data as 100001,100002 and so on till 500000 , what i mean is to create a file which will just have 5,00,000 lakh records which should be numbered from 100001 - 500000 .
Code:

100001
100002
100003
100004
.
.
.
499997
499998
499999
500000
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Thu Aug 12, 2010 10:09 am    Post subject: Re: create a file with numbered Reply with quote

yadav2005 wrote:
Hi,

I want to just create an input file for testing which should contain first 6 bytes of data as 100001,100002 and so on till 500000 , what i mean is to create a file which will just have 5,00,000 lakh records which should be numbered from 100001 - 500000 .


Yadav2005,

Huh? Do you realize that your counter starts at 100,001 and if the last number is 500,000 , you only will have 400,000 records and NOT 500,000 records ? If the counter started from 1 , then you would have 500,000 records.

Also the number you want is JUST 5 lakhs or 500 hundred thousand and NOT 5,00,000 lakh.

Either way the following DFSORT job gives you a 6 byte counter seqnum starting from 100,001 in pos 1 for 6 bytes. You can change the number on REPEAT parm to whatever number of records you want.

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD *                                               
A                                                             
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                             
  OUTFIL REPEAT=400000,BUILD=(SEQNUM,6,ZD,START=100001,INCR=1)
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Thu Aug 12, 2010 10:50 am    Post subject: Reply with quote

Thanks Kolusu it helped me . I should have been more clear in my requirement , I wanted to start from 000001 till 500000 so that I have 5 lakh records.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group