Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

HOW TO BREAK ONE file into two or more file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vishal_a

New User


Joined: 24 May 2005
Posts: 45
Location: Noida

PostPosted: Mon Aug 22, 2005 1:29 pm    Post subject: HOW TO BREAK ONE file into two or more file
Reply with quote

please help
i have got one file how to break it into two or more files icon_confused.gif
Back to top
View user's profile Send private message

radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 436
Location: chennai, India

PostPosted: Mon Aug 22, 2005 1:33 pm    Post subject:
Reply with quote

Under what condition do you need to break into more than one file?
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Mon Aug 22, 2005 1:42 pm    Post subject: Re: HOW TO BREAK ONE file into two or more file
Reply with quote

Hi,

U can break file in more than one file by using STOPAFT and SKIPREC in sort. So that it can copy particular number of records in file.

Regards
Rupesh
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Mon Aug 22, 2005 5:09 pm    Post subject: Re: HOW TO BREAK ONE file into two or more file
Reply with quote

If your control card has the following OUTFIL statement

SORT FIELDS=COPY
OUTFIL FILES=(1,2),SPLIT

Then the input records will be evenly split between the output files. In this above case there are 2 output files. The first output file will have record numbers 1,3,5, etc and the second file will have 2,4,6 etc.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Mon Aug 22, 2005 7:44 pm    Post subject:
Reply with quote

Hi Vishal,

Here is the example.

//JZ1B0CQ JOB (JZ1B0C,@),
// 'OUTFIL EXAMPLE',
// CLASS=0,
// MSGCLASS=R,
// TIME=(60),
// MSGLEVEL=(1,1),
// NOTIFY=JZ1B0C
//STEP010 EXEC PGM=SORT ,COND=(0,NE)
//*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=JZ1B0C.MASTER.INPUT,
// DISP=SHR
//*
//FILE1 DD DSN=JZ1B0C.SPLIT.FILE1,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//FILE2 DD DSN=JZ1B0C.SPLIT.FILE2,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//FILE3 DD DSN=JZ1B0C.SPLIT.FILE3,
// DISP=(NEW,CATLG),RECFM=FB,LRECL=80,
// UNIT=SYSDA,
// MGMTCLAS=WORK5
//*
//SYSIN DD *
SORT FIELDS(1,4,CH,A)
OUTFIL INCLUDE=(1,4,CH,EQ,C'2001'),FNAMES=FILE1
OUTFIL INCLUDE=(1,4,CH,EQ,C'2002'),FNAMES=FILE2
OUTFIL SAVE,FNAMES=FILE3
END
/*

File3 is going to have the one's that are not in file1 and file2
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Aug 22, 2005 9:06 pm    Post subject:
Reply with quote

Quote:
i have got one file how to break it into two or more files


How exactly you would do that depends entirely on how you want to break up the files as demonstrated by the different approaches suggested by other posters. See the following for several ways to split a file with DFSORT:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst01.html#t01

If you need more specific help, you need to state exactly what it is you want to do.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us