Hi,
What is the difference between the following two statements:
MERGE FIELDS=COPY and SORT FIELDS=COPY
can you please help. I've also used them interchangbliy an not sure if there is a difference between them.
MERGE FIELDS=COPY and SORT FIELDS=COPY.
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: MERGE FIELDS=COPY and SORT FIELDS=COPY.
From the manual:
Specifying COPY on the SORT, MERGE, or OPTION statement
z/OS DFSORT: Getting Started
SC23-6880-00
The SORT and MERGE statements change very little when you specify COPY. Just replace the information you usually put in parentheses with the word COPY:
SORT FIELDS=COPY
MERGE FIELDS=COPY
You can also specify COPY on the OPTION statement:
OPTION COPY
All three of these statements have identical results.
- Anuj Dhawan
- Founder
- Posts: 2802
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: MERGE FIELDS=COPY and SORT FIELDS=COPY.
MERGE is used to combine multiple sorted files into a single file. The MERGE process presumes that the specified input files are already in sorted order by the key field. But it is with when you use key fields with MERGE statement. As Robert has indicated, if you are using these keywords with COPY - they all are just identical and somewhat misnomer too...IMHO.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: MERGE FIELDS=COPY and SORT FIELDS=COPY.
OPTION COPY solves the misnomer issue.
MERGE FIELDS=COPY can then be use for multiple input files not suitable for concatenation, like VSAM.
MERGE FIELDS=COPY can then be use for multiple input files not suitable for concatenation, like VSAM.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute