split a huge file using the FILE-AID
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Interview Q & A

#1: split a huge file using the FILE-AID Author: mf_user PostPosted: Tue Mar 07, 2006 7:20 am
    —
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.

#2:  Author: kolusuLocation: San Jose PostPosted: Tue Mar 07, 2006 10:14 am
    —
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

#3:  Author: mf_user PostPosted: Wed Mar 08, 2006 4:16 am
    —
Thanks a lot Kolusu. It has solved my problem.

#4:  Author: psmadhusudhan PostPosted: Tue Aug 28, 2007 4:39 am
    —
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.

#5:  Author: vivek1983 PostPosted: Tue Aug 28, 2007 5:21 am
    —
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

#6:  Author: psmadhusudhan PostPosted: Wed Aug 29, 2007 4:31 am
    —
vivek1983

Thanks for your reply Smile



MVSFORUMS.com -> Interview Q & A


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group