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

How to handle control records when we split into two files?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Swami-gs

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Sun Dec 09, 2007 5:52 am
Reply with quote

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
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Dec 10, 2007 9:50 pm
Reply with quote

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?.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top