Swami-gs
New User
Joined: 27 Apr 2007 Posts: 20 Location: Chennai
|
|
|
|
Hi all
I have a file and I am going to split that file into two files using few conditions. Also, I need to have Control records at the end of both the files.
Control Records: This is a record normally will be end of a file, which consists of Records count and Total of amount variables.
----------------------------------------------------------------------------------
This is the code which i tried, but its not putting any control record at the end of both the files.
----------------------------------------------------------------------------------
SORT FIELDS=COPY,
SIZE=E99999999,DYNALLOC=(SYSDA,32)
MODS E35=(Z7476BIG,100,MODLIB,N)
OUTFIL FILES=1,
OMIT=(1,7,CH,EQ,X'FFFFFFFFFFFFFF',OR,
2798,2,CH,EQ,C'T ')
OUTFIL FILES=2,
OMIT=(1,7,CH,EQ,X'FFFFFFFFFFFFFF',OR,
2798,2,CH,NE,C'T ')
where Z7476BIG is a exit routine program which handles creating control record. I want the control record to be there in both files. Is it possible to do in a single sort.
Thanks.
Swami |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
where Z7476BIG is a exit routine program which handles creating control record. |
We have no idea what your exit routine does so how can you expect us to give a specific answer your question?
If your exit routine passes the control record to DFSORT as the last record, then DFSORT will write that control record as the last record to both files providing your OMIT operands don't omit it.
Note that if your control record has X'FFFFFFFFFFFFFF' in positions 1-7, your OMIT statements will omit it.
If you need more specific help, you need to say more about the control record your exit produces. Is it the last record? Is there something in the record that identifies it?. |
|