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 

split a huge file using the FILE-AID

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A
View previous topic :: View next topic  
Author Message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Tue Mar 07, 2006 7:20 am    Post subject: split a huge file using the FILE-AID Reply with quote

Hi,

I faced this question in an interview.

How to split a file into multiple files using FILE-AID? The input file has got 10,00,000 records. First two output files should have 4,00,000 records and last output file should have 2,00,000 records.

How to achieve it using File-Aid only? Shocked

Thanks a lot.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Mar 07, 2006 10:14 am    Post subject: Reply with quote

mf_user,

Try this job.
Code:

//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*               
//SYSLIST  DD SYSOUT=*               
//DD01     DD *                     
1                                   
2                                   
3                                   
4                                   
5                                   
6                                   
7                                   
8                                   
9                                   
10
//OUTPUT1  DD SYSOUT=*         
//OUTPUT2  DD SYSOUT=*         
//OUTPUT3  DD SYSOUT=*         
//SYSIN    DD *                 
$$DD01 USER WRITE=OUTPUT1,OUT=4
$$DD01 USER WRITE=OUTPUT2,OUT=4
$$DD01 USER WRITE=OUTPUT3,OUT=0
/*


Output 1 will have the first 4 records and output2 will have the next 4 records and output3 will have the all the records which are not copied into output1 and output2

Hope this helps...

Cheers

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


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Wed Mar 08, 2006 4:16 am    Post subject: Reply with quote

Thanks a lot Kolusu. It has solved my problem.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Tue Aug 28, 2007 4:39 am    Post subject: Reply with quote

Kolusu

I have tried your given code but it is abending with Abend code S806 Embarassed The reason is giving as

Code:
The system completion code of S806-04 was issued when BLDL found an
error during LINK(X), XCTL(X), ATTACH(X), or LOAD processing.

A program to be loaded from a system library could not be found.
Program FILEAID was requested on the EXEC statement.


I am having DFSORT in my shop. Can you please help me.
_________________
Thanks
Madhu Sudhan
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Tue Aug 28, 2007 5:21 am    Post subject: Reply with quote

psmadhusudhan,

Seems your shop doesnt have FILEAID.
Please check if you have FILEAID in your shop.

The following link shows how to split a file using SORT.

http://www.mvsforums.com/helpboards/viewtopic.php?t=3453&highlight=split+file+dfsort


Vivek G
Back to top
View user's profile Send private message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Wed Aug 29, 2007 4:31 am    Post subject: Reply with quote

vivek1983

Thanks for your reply Smile
_________________
Thanks
Madhu Sudhan
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 -> Interview Q & A 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