View previous topic :: View next topic |
Author |
Message |
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Tue Mar 07, 2006 7:20 am Post subject: split a huge file using the FILE-AID |
|
|
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?
Thanks a lot. _________________ MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
== |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Mar 07, 2006 10:14 am Post subject: |
|
|
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 |
|
|
mf_user Intermediate
Joined: 01 Jun 2003 Posts: 372 Topics: 105
|
Posted: Wed Mar 08, 2006 4:16 am Post subject: |
|
|
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 |
|
|
psmadhusudhan Beginner
Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Tue Aug 28, 2007 4:39 am Post subject: |
|
|
Kolusu
I have tried your given code but it is abending with Abend code S806 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 |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
|
Back to top |
|
|
psmadhusudhan Beginner
Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Wed Aug 29, 2007 4:31 am Post subject: |
|
|
vivek1983
Thanks for your reply _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
|
|
|