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

STOP Copy the records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Thu Apr 28, 2011 6:25 pm
Reply with quote

Does DFSORT has any keyword by which it can stop copy records in output file, when the output file record count reached with specified record count.

I know my output file can contain at max 2 records based on the condition I put in the SORT. I want to stop processing once the record count reached in the output file, DFSORT need to stop processing of reading the whole file.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Apr 28, 2011 7:27 pm
Reply with quote

Perhaps the STOPAFT keyword is what you want ?

Garry.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 28, 2011 7:54 pm
Reply with quote

shrivatsa wrote:
I know my output file can contain at max 2 records based on the condition I put in the SORT.


You are certain of this?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Apr 28, 2011 7:56 pm
Reply with quote

all depends on the layout/sorting status of the input file
since You do not tell how the two needed records are populated little can be said!
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Thu Apr 28, 2011 10:10 pm
Reply with quote

Yes I know that there can be max 2 records can be for a key combination

for example I have below records as input file I know the key record 002133457 I need in the output file. For this Key there can be either P record or T record exists or both can exists. I want my my sort should stop reach after reading the key. i.e it should not read the key 002133458.

I don't have the information the record number on which the key exists in the example by looking it we can say that the 3rd record is the key. But from the file which I am copying the record I don't have the information.

Code:
002133456   P   IN
002133456   T   CA
002133457   P   WA
002133458   P   RI
002133458   T   AZ


Please let me know if this is can be done in DFSORT?

Thanks for all your time spending to resolve the problem
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: Thu Apr 28, 2011 10:48 pm
Reply with quote

Your description of your requirement is very confusing. I really have no idea what you're actually trying to do.

All I can do is tell you a little about how STOPAFT works that may or may not be relevant.

DFSORT's STOPAFT=2 parameter can stop reading the input after 2 records are accepted. So for example, if you wanted to stop after finding 2 records with key '002133456', you could use:

Code:

   OPTION COPY,STOPAFT=2
   INCLUDE COND=(1,9,CH,EQ,C'002133456')


But if you only have one 002133456 record, the entire file would have to be read looking for that second 002133456 record that isn't there.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Fri Apr 29, 2011 1:58 pm
Reply with quote

Thanks Frank that is what I required. I thought STOPAFT will stop after reading the specified number of records from the input file.
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(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top