View previous topic :: View next topic
|
Author |
Message |
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
Hi, I just had a situation where I want to split the Variable Blocked file based on the length of records. I want to know if this is possible using ICETOOL. If yes, how?
Variable blocked file has records of length 50 and 100 only. I want to have two different files - one with having records only of length 50 and another having records only of length 100. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Bytes 1 and 2 of the RDW contain the length of the record. You can use this to include the records into seperate files. For example the code below will only copy records of 51 bytes length, or greater.
Code: |
INCLUDE COND=(1,2,BI,GE,51) |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Nandan,
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//OUT50 DD DSN=... output file1 (VB)
//OUT100 DD DSN=... output file2 (VB)
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT50,INCLUDE=(1,2,BI,EQ,50)
OUTFIL FNAMES=OUT100,INCLUDE=(1,2,BI,EQ,100)
/*
|
|
|
Back to top |
|
|
NandanPhalak
New User
Joined: 14 Apr 2009 Posts: 14 Location: India
|
|
|
|
Thanks Expat and Frank!! You guys Rock! |
|
Back to top |
|
|
|