Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
HI,
Did u mention the DCB parameters for the output file , otherwise , u have to give it in the SYSIN.
One more thing is ,
i think we can use both merge and sort in one sysyin
like
Code:
//SYSIN DD * 7
MERGE FIELDS=(4,19,CH,A)
RECORD TYPE=V,LENGTH=(100,,20)
INCLUDE COND=(898,1,CH,LE,C'2')
/*
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
LinkinPark wrote
Quote:
Can I using the system program SORT to merge the serial same layout datasets to one ,if can , how to do ?
You need to give more details.
SORT means to create an output data set by combining two or more data sets on one or more keys. The data sets DO NOT have to already be in order by the keys.
MERGE means to create an output data set by combining two or more data sets on one or more keys. The data sets DO have to already be in order by the keys.
COPY means to create an output data set by combining two or more data sets one after the other without regard to a key.
Which are you trying to do? SORT, MERGE or COPY? The job you need is different for each one.
What is the RECFM and LRECL of each input file?
If you're trying to do a SORT or MERGE, what is the position, length and format of the key or keys in each input file?
This is pretty basic stuff, so you're obviously 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:
Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
Hi all ,
Thanks for ur helps,
Hi Frank Yaeger,
I have downloaded and read the document , it provide me lots of knowledges , I appreciate u very much .question more , How can i get the document about others ,e.g. IEFBR14 ,EZTPA00 document ?
looking through my code , I wanna merge two datasets and output two datasets according to coditions respectively. after running , dateset sortout1 and sortout2 only contain the S2 records ,why?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I don't know anything about what your input records look like, so all I can do is guess that your conditions only INCLUDE records from S2, that is, only S2 has records where 26,2,ZD is 01 or 02.
Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
Hi Frank Yaeger,
The input records S1.KE&S2.KE have same layout and position 26 legth 2 is 01 or 02 or 03 or 04 .....and so on ..
what I mean is make sure the output sortout01 including "01" from both S1.KE and S2.KE, output sortout2 including "02" from both S1.KE and S2.Ke..
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
As I said, if you only got records from S2, then only S2 has 01 or 02 as a 2-byte ZD value in 26-27. I don't understand what else you expect me to tell you.
If you want to see how many records in S1 and S2 have each 2-byte ZD value, you can run the following DFSORT/ICETOOL job. If a value does not appear with its count, it means its not in that file (e.g. if you don't see 3 with a count, then 3 does not appear in the file). That will either prove that only S2 has 1 and 2 as a 2-byte ZD value in positions 26-27, or that position 26-27 does not actually have what you think it does.
Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
Hi Frank Yaeger,
tell u my requirement:
S1.KE and S2.KE have same layout :
e.g
S1.KE
----------------
NAME ID
----------------
0 1 26 2
----------------
A 01
B 02
C 01
D 02
E 03
F 04
S2.KE
----------------
NAME ID
----------------
0 1 26 2
----------------
G 01
H 02
I 01
J 02
K 03
L 04
and after sort
make sure
dateset sortout1 include following records which only ID=01
----------------
NAME ID
----------------
0 1 26 2
----------------
A 01
C 01
G 01
I 01
sortout2 include following records which only ID=02
Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
Hi Frank Yaeger,
tell u my requirement:
S1.KE and S2.KE have same layout :
e.g
S1.KE
----------------
NAME ID
----------------
0 1 26 2
----------------
A 01
B 02
C 01
D 02
E 03
F 04
S2.KE
----------------
NAME ID
----------------
0 1 26 2
----------------
G 01
H 02
I 01
J 02
K 03
L 04
and after sort
make sure
dateset sortout1 include following records which only ID=01
----------------
NAME ID
----------------
0 1 26 2
----------------
A 01
C 01
G 01
I 01
sortout2 include following records which only ID=02
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Please post in the DFSORT Forum so I can fix things up for you if necessary. As the Moderator of the DFSORT Forum, I have edit authority for that Forum. I don't have edit authority for this Forum.