Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 55
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: 55
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: 973
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us