|
View previous topic :: View next topic
|
| Author |
Message |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
Hi All,
Can I using the system program SORT to merge the serial same layout datasets to one ,if can , how to do ?
Regards,
Thanks,
LinkinPark. |
|
| Back to top |
|
 |
Gautam512
Active User

Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Try this one , this is SYNCSORT
| Code: |
//JOB STATEMENT
//MERGE1 EXEC PGM=SYNCSORT
//*
//SORTIN01 DD DSN=SALES91,DISP=(OLD,KEEP)
//*
//SORTIN02 DD DSN=SECOND>DATASET,DISP=(OLD,KEEP)
//*
//SORTOUT DD DSN=OUTPUT>DATASET,
//*
//SYSIN DD *
MERGE FIELDS=COPY
/* |
Thanks,
Gau |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
Hi Gautam512,
I found a demo that type the statement " RECORD TYPE=F,LENGTH=225 "
under the line " MERGE FIELDS=COPY ", what's meaning of this ,
if I wanna inculde the sort codition , I just type
//JOB STATEMENT
//MERGE1 EXEC PGM=SYNCSORT
//*
//SORTIN01 DD DSN=SALES91,DISP=(OLD,KEEP)
//*
//SORTIN02 DD DSN=SECOND>DATASET,DISP=(OLD,KEEP)
//*
//SORTOUT DD DSN=OUTPUT>DATASET,
//*
//SYSIN DD *
MERGE FIELDS=COPY
SORT FIELDS=(4,19,CH,A)
INCLUDE COND=(898,1,CH,LE,C'2')
will be ok ? |
|
| Back to top |
|
 |
Gautam512
Active User

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')
/* |
|
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
Hi Gautam512,
I type the frist demo u gave, show me the JCL error .
return code is 16,
"SORTIN NOT DEFINED"
need ur more explanations,
Regards,
Thanks,
LinkinPark |
|
| Back to top |
|
 |
Gautam512
Active User

Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Try this one, u cud have posted in DFSORT Forum.....
| Code: |
//JOB STATEMENT
//*
//STEP001 EXEC PGM=SYNCSORT
//SORTIN01 DD DSN=INPUT.FILENAME1,DISP=SHR
//SORTIN02 DD DSN=INPUT.FILENAME2,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILENAME,
// DISP=(NEW,CATLG,DELETE),
// DCB=*.SORTIN,
// SPACE=(CYL,(30,30),RLSE)
//SRTMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD * 7
MERGE FIELDS=(4,19,CH,A)
INCLUDE COND=(898,1,CH,LE,C'2')
/* |
Thanks,
Gau |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
Hi Gautam512,
error message :
INVALID REFERBACK '*.SORTIN' DETECTED -- (J)12
It's realy hard to me ..
Regards&Thanks,
LinkinPark |
|
| Back to top |
|
 |
Gautam512
Active User

Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
HI,
As the input file layout is same as the out put sa i used the
*.SORTIN
change it to
DCB=*.SORTIN01
Thanks,
Gau |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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:
Use [URL] BBCode for External Links |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

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 ?
Regards&Thanks,
LinkinPark |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| How can i get the document about others ,e.g. IEFBR14 ,EZTPA00 document ? |
I suspect IEFBR14 is too simple to have any documentation.
As for documentation on other utilities/products, you'll need to have somebody else help you with that. |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
| Code: |
//STEP001 EXEC PGM=SORT,COND=EVEN
//SORTIN01 DD DSN=S1.KE,DISP=SHR
//SORTIN02 DD DSN=S2.KE,DISP=SHR
//SORTOUT1 DD DSN=LJPVPJ1.UJPJ1J5.OUTP.MLOUT1,
//SORTOUT2 DD DSN=LJPVPJ1.UJPJ1J5.OUTP.MLOUT2,
//SYSIN DD *
MERGE FIELDS=(4,19,CH,A)
OUTFIL FNAMES=SORTOUT1,INCLUDE=(26,2,ZD,EQ,01)
OUTFIL FNAMES=SORTOUT2,INCLUDE=(26,2,ZD,EQ,02)
|
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? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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. |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

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..
Regars&Thanks,
LinkinPark |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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.
| Code: |
//STEP1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//S1 DD DSN=S1.KE,DISP=SHR
//S2 DD DSN=S2.KE,DISP=SHR
//SHOWS1 DD SYSOUT=*
//SHOWS2 DD SYSOUT=*
//TOOLIN DD *
OCCUR FROM(S1) LIST(SHOWS1) ON(26,2,ZD) ON(VALCNT) BLANK
OCCUR FROM(S2) LIST(SHOWS2) ON(26,2,ZD) ON(VALCNT) BLANK
/*
|
|
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

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
.............................................
that's all
Regards&Thanks
LinkinPark. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Please use ubb code tags around your data, or repost in the DFSORT Forum so I can do it for you. |
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

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
.............................................
that's all
Regards&Thanks
LinkinPark]
|
|
| Back to top |
|
 |
LinkinPark Warnings : 1 New User

Joined: 20 Nov 2005 Posts: 44 Location: DALIAN,CHINA
|
|
|
|
Hi All
sorry , it's my fault that press the worry button
.... |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|