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
 

 

STOP Copy the records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Thu Apr 28, 2011 6:25 pm    Post subject: STOP Copy the records
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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Apr 28, 2011 7:27 pm    Post subject:
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    Post subject: Re: STOP Copy the records
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Apr 28, 2011 7:56 pm    Post subject: Reply to: STOP Copy the records
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: 171
Location: Bangalore

PostPosted: Thu Apr 28, 2011 10:10 pm    Post subject: Reply to: STOP Copy the records
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 Moderator


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

PostPosted: Thu Apr 28, 2011 10:48 pm    Post subject:
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: 171
Location: Bangalore

PostPosted: Fri Apr 29, 2011 1:58 pm    Post subject: Reply to: STOP Copy the records
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    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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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