View previous topic :: View next topic
|
Author |
Message |
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
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 |
|
|
sgaid21
New User
Joined: 12 Sep 2006 Posts: 16 Location: Canada
|
|
|
|
You can still use SORT utility with SORT FIELDS=COPY with your INCLUDE COND statement.
Hope that would help you. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Sysaron
New User
Joined: 28 Sep 2005 Posts: 55 Location: USA
|
|
|
|
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 |
|
|
manikanth_e
New User
Joined: 27 Mar 2007 Posts: 13 Location: chennai
|
|
|
|
Frank,
whether OPTION COPY holds in good performance than
SORT FIELDS=COPY for copying the file?
Thanks,
Mani. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
manikanth_e
New User
Joined: 27 Mar 2007 Posts: 13 Location: chennai
|
|
|
|
Thanks frank |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
|