I have a file whose attributes are PS, LRECL=80,FB
Based on the first four characters I need to copy the record to four output files. (Which have same attributes as input file)
Ex: if first four characters are 1010,this record should be copied to
Output file1,
If first four characters are 1020,this record should be copied to
Output file2 like wise I need to copy to four files
I can do it by outfil fnames & include cond
But if we code outfil & include all records which satisfy above condition will be copied but I want the each output files to contain maximum 100 records bcoz I need sample data not the entire records
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's IFTHEN and OVERLAY functions. Only DFSORT has these functions, so if you don't have DFSORT, you won't be able to use them. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use DFSORT's new ACCEPT=n function to do this more easily like this: