IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

splitting the large file using File-Aid.


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Tue Mar 07, 2006 5:41 pm
Reply with quote

Hi,

I faced this question during 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? icon_eek.gif

Thanks a lot in advance.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Wed Mar 29, 2006 6:07 pm
Reply with quote

Hi,

This can be done thru JCL using File-Aid , if u need it i'll post the JCL.
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Wed Mar 29, 2006 6:53 pm
Reply with quote

Gautam512,

Please post the JCL.

TIA.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Thu Mar 30, 2006 7:52 pm
Reply with quote

Hi,

Here is the JCL

Code:
//  --- - -       Job Card -------
//*                                                     
//*-----------------------------------------------------
//FILEAID  EXEC PGM=FILEAID         
//*                                 
//SYSIN    DD *                     
                                 
$$DD01     USER OUT=num of records,WRITE=FILE1
$$DD01     USER OUT=num of records,WRITE=FILE2
$$DD01     USER OUT=num of records,WRITE=FILE3

//DD01     DD DSN=INPUT.DATASET,DISP=SHR
//FILE1    DD DISP=(NEW,CATLG,DELETE),               
//            UNIT=TMSPROD,SPACE=(CYL,(20,10),RLSE),
//            DCB=*.DD01,                           
//            DSN=DATASET.OUT1                             
//*                                                 
//FILE2    DD DISP=(NEW,CATLG,DELETE),               
//            UNIT=TMSPROD,SPACE=(CYL,(200,10),RLSE),
//            DCB=*.DD01,                           
//            DSN=DATASET.OUT2                             
//FILE3    DD DISP=(NEW,CATLG,DELETE),               
//            UNIT=TMSPROD,SPACE=(CYL,(200,10),RLSE),
//            DCB=*.DD01,                           
//            DSN=DATASET.OUT3                             
//*
//* For how many output file , so many output dataset steps
//* End JCL
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Fri Mar 31, 2006 11:19 am
Reply with quote

Hi mf_user,

did u try the jcl , did u got ur expected results,

let me know if there is any problem.....
Back to top
View user's profile Send private message
ameetmund

New User


Joined: 02 Jun 2006
Posts: 11

PostPosted: Fri Jun 02, 2006 10:05 am
Reply with quote

Hi,

Its very easy to split a file using file-aid. No need to write any JCL for that icon_biggrin.gif
Just follow the following process to split a file

1) go to option 3.3 in file aid
2) specify your from and to file name
3) Then give selection criteria usage as 'T'
4) Then it will take you to the next screen where it will have 3 options
5) choose the first one 'OPTION'
6) Then in the following screen u can have your own criteria to select records e.g forward or backward, no of records to skip, no of records to select etc....

File-AID -------------- Selection Criteria Options ------------------------
COMMAND ===>

Specify Selection Criteria Options:
Start at the following record key
(both blank for start of dataset)
Starting record key ===>
- OR - OR at the following RBA or RRN
Starting RBA or RRN ===>

Initial records to skip ===> 0 then skip this many records

Subsequent Selection Interval: then repeat the following
Records to select ===> 1 - select this many records
Records to skip ===> 0 - then skip this many records
until
Number of records to search ===> ALL you have read this many records
Number of records to select ===> ALL or selected this many records

SEQ/VSAM processing direction ===> F (F = Forward; B = Backward)


Use ENTER to return to selection criteria menu


I think it will solve your problem......if u have any problem feel free to ask

Amit
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top