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

Copy and Omit records without sorting?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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 Developer


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

PostPosted: Thu Jun 07, 2007 12:50 am
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:

Use [URL] BBCode for External Links

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
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
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 Developer


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

PostPosted: Thu Jun 07, 2007 3:18 am
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
Reply with quote

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

Senior Member


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

PostPosted: Thu Jun 07, 2007 7:06 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
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
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top