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
 

 

Copy and Omit records without sorting?

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

New User


Joined: 28 Sep 2005
Posts: 49
Location: USA

PostPosted: Thu Jun 07, 2007 12:04 am    Post subject: Copy and Omit records without sorting?
Reply with quote

I would like to use an IBM utility to copy a sequential file, while omitting all records that have '99999' in the first position. I would feel silly using a "SORT utility" when I definitely do not want to SORT the file, only copy it with ommissions.

Could someone please tell me the correct utility and what the sysin card would look like?

Sharon
Back to top
View user's profile Send private message

sgaid21

New User


Joined: 12 Sep 2006
Posts: 16
Location: Canada

PostPosted: Thu Jun 07, 2007 12:27 am    Post subject:
Reply with quote

You can still use SORT utility with SORT FIELDS=COPY with your INCLUDE COND statement.

Hope that would help you.
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 Jun 07, 2007 12:50 am    Post subject:
Reply with quote

Sharon,

The correct utility is DFSORT which can perform sort, copy and merge operations as well as many other functions. The DFSORT job would be:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  OMIT COND=(1,5,CH,EQ,C'99999')
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Note: Please don't post the same question in more than one Topic.
Back to top
View user's profile Send private message
Sysaron

New User


Joined: 28 Sep 2005
Posts: 49
Location: USA

PostPosted: Thu Jun 07, 2007 2:01 am    Post subject:
Reply with quote

Hi Frank,
Thank you for the advice. It worked perfectly. I was not aware of the "OPTION COPY". I will spend more time reviewing the book(s). Sorry I posted the question in two places. It was the advise of the Topic moderator in the other group to come here and look. When I didnt find anything related to my subject, I posted.
Thanks again,
Sharon
Back to top
View user's profile Send private message
manikanth_e

New User


Joined: 27 Mar 2007
Posts: 13
Location: chennai

PostPosted: Thu Jun 07, 2007 3:07 am    Post subject: Re: Copy and Omit records without sorting?
Reply with quote

Frank,
whether OPTION COPY holds in good performance than
SORT FIELDS=COPY for copying the file?


Thanks,
Mani.
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 Jun 07, 2007 3:18 am    Post subject:
Reply with quote

OPTION COPY, SORT FIELDS=COPY and MERGE FIELDS=COPY are all equivalent. They all indicate a copy operation - there's no difference between them.
Back to top
View user's profile Send private message
manikanth_e

New User


Joined: 27 Mar 2007
Posts: 13
Location: chennai

PostPosted: Thu Jun 07, 2007 9:33 am    Post subject: Re: Copy and Omit records without sorting?
Reply with quote

Thanks frank
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Thu Jun 07, 2007 7:06 pm    Post subject:
Reply with quote

The advantage of using the SORT rather than IEBGENER for even a full copy is that you get a report with counts, LRECL's, etc.
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 Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
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


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