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 handle control records when we split into two files?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to handle control records when we split into two files?
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 Moderator


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

PostPosted: Mon Dec 10, 2007 9:50 pm    Post subject:
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    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
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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