|
View previous topic :: View next topic
|
| Author |
Message |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
| hi, i hav 5 ps with content , each of those ps s having output of differenrt queries , ie count * values. Now i want to get all those ps contents in to one ps and in the same row...can any one give the solution pls... |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can use IEBGENER.
O. |
|
| Back to top |
|
 |
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
| ofer71 wrote: |
You can use IEBGENER.
O. |
COULD YOU PLS TELL ME HOW CAN I USE IEBGENER??
Here s my problem( i cant use icetool)
....example...
I want to merge two files laterally record by record. For example:
If FILE1 contains:
56789
BBBBB
CCCCC
and FILE2 contains:
11111
22222
33333
then my output file should contain:
5678911111
BBBBB22222
CCCCC33333
please help me on this.... |
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
hi.. cant use ICETOOL...is there any other way.... |
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
| fuadk84 wrote: |
| hi, i hav 5 ps with content , each of those ps s having output of differenrt queries , ie count * values. Now i want to get all those ps contents in to one ps and in the same row...can any one give the solution pls... |
Here s my problem( i cant use icetool)
....example...
I want to merge two files laterally record by record. For example:
If FILE1 contains:
56789
BBBBB
CCCCC
and FILE2 contains:
11111
22222
33333
then my output file should contain:
5678911111
BBBBB22222
CCCCC33333
plz help me on dis...... |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
IEBGENER is a standard MVS utility. You can read more about it in the fine manual.
O. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
ofer71 wrote
| Quote: |
| IEBGENER is a standard MVS utility. You can read more about it in the fine manual. |
And where exactly in the fine manual does it show how to do the "join" that fuadk84 wants to do? Please show us the IEBGENER job to do that (I'm curious if IEBGENER can actually do it). |
|
| Back to top |
|
 |
ofer71
Global Moderator

Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I believe that concatanating datasets in SYSUT1 will result in one SYSUT2.
O. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| I believe that concatanating datasets in SYSUT1 will result in one SYSUT2. |
You need to read fuadk84's description of what's wanted carefully. You could use IEBGENER to concat file1 and file2 to get this output:
56789
BBBBB
CCCCC
11111
22222
33333
But what fuadk84 wants for output is this:
5678911111
BBBBB22222
CCCCC33333
That's a "join" of the field in file1 with the field in file2. The SPLICE operator of DFSORT's ICETOOL can do that, but as far as I know, IEBGENER can't.
For some reason, fuadk84 says ICETOOL can't be used. Not sure why. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
I'm stuck with Syncsort where I'm working for the moment, but I recall that it can join the data from two records, I'm not sure without the fine manual. I can only assume that DFSort can do it?
Hey Frank, working late? What time is "the" dinner......grin.....
Happy turkey day,
Bill |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Yes, DFSORT can do it with SPLICE.
Actually, it's only 1:20pm here (West Coast). Dinner isn't for quite a while (my wife just put the Turkey in the oven ... yum).
Happy Thanksgiving to you, too. |
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
| fuadk84 wrote: |
| hi, i hav 5 ps with content , each of those ps s having output of differenrt queries , ie count * values. Now i want to get all those ps contents in to one ps and in the same row...can any one give the solution pls... |
Thank You ...i can use icetool here.....am getting the output partially..
please find the jcl below for the same problem
//S1 EXEC PGM=ICETOOL
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=TNL.MKC.PS1,DISP=SHR
//IN2 DD DSN=TNL.MKC.PS2,DISP=SHR
//TMP1 DD DSN=TNL.MKC.TMP,DISP=(MOD,DELETE),
// SPACE=(TRK,(5,5)),UNIT=SYSDA,LRECL=80
//OUT DD DSN=TNL.MKC.PS,DISP=SHR
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CTL1)
COPY FROM(IN2) TO(TMP1) USING(CTL2)
SPLICE FROM(TMP1) TO(OUT) ON(11,8,PD) WITH(6,5) USING (CTL3)
//CTL1CNTL DD *
OUTREC FIELDS=(1:1,5,11:SEQNUM,8,PD)
/*
//CTL2CNTL DD *
OUTREC FIELDS=(6:1,5,11:SEQNUM,8,PD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,OUTREC=(1,10)/*
here the problem is "using (ctl3)" is not working.am getting the
output + low values bcos of this problem.actually my output
s lik 1111122222........( 11111 from file1,22222 frm file 2) .
Am getting lowvalues after my desired output since ctl3cntl
is not working properly.
Can any one help me on this plzz... |
|
| Back to top |
|
 |
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi,
Your Outrec is 10. Then how you will get Lowvalues in a record?
"1111122222" is length of 10 and there is no space in the record to get low values then how you are getting low values? |
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
| surya_pathaus wrote: |
Hi,
Your Outrec is 10. Then how you will get Lowvalues in a record?
"1111122222" is length of 10 and there is no space in the record to get low values then how you are getting low values? |
sorry , i forgot to mention one thing , actually am getting maxcc 16
when i try to do as mentioned below .
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,OUTREC=(1,10)
/*
am getting the output "1111122222............."(i hav given reclen as 80 for the output file since the outrec lenght may cm till 80)
when i dont use this CTL3CNTL part. When i use CNTL3 to format it
it s givin maxcc 16.....Please hav a look on this... |
|
| Back to top |
|
 |
subhasis_50
Moderator

Joined: 09 Mar 2005 Posts: 363 Location: Earth
|
|
|
|
Try this
| Code: |
//STEP0100 EXEC PGM=ICETOOL
//*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
56789
BBBBB
CCCCC
/*
//IN2 DD *
11111
22222
33333
/*
//T3 DD DSN=&&TEMPFIL1,
// DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//T4 DD DSN=&&TEMPFIL2,
// DISP=(,PASS),SPACE=(TRK,(1,1),RLSE)
//CON DD DSN=&TEMPFIL1,VOL=REF=*.T3,DISP=(OLD,PASS)
// DD DSN=&TEMPFIL2,VOL=REF=*.T4,DISP=(OLD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(T3) USING(CTL1)
COPY FROM(IN2) TO(T4) USING(CTL2)
SPLICE FROM(CON) TO(OUT) ON(81,8,ZD) WITH(6,5) USING(CTL3)
//CTL1CNTL DD *
OUTFIL FNAMES=T3,OUTREC=(1,5,5Z,80:X,SEQNUM,8,ZD)
//CTL2CNTL DD *
OUTFIL FNAMES=T4,OUTREC=(5Z,6:1,5,80:X,SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,OUTREC=(1,80)
/*
|
|
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
thank you... its workin fine.... |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
| Quote: |
| am getting the output + low values |
You are getting low values because you specified LRECL=80 on the TMP1 DD. The OUTREC in CTL1CNTL creates an 18 byte record, but since you have LRECL=80 for TMP1, DFSORT pads the 18 byte records will X'00's to 80 byte records. Remove the LRECL=80 from the TMP1 DD and you won't get the low values.
I'm not sure what you're saying about CTL3CNTL. If you got a RC=16, then there will be an error message in DFSMSG, but you didn't show it.
If you use:
| Code: |
OUTFIL FNAMES=OUT,OUTREC=(1,10)
|
you will create 10 byte records for the OUT data set. If the OUT DD specifies a file with LRECL=10, then you'll just get those 10 bytes. If the OUT DD specifies a file with LRECL=80, then again DFSORT will pad with low values. If you want 80 byte records, with the first 10 bytes and then blanks, use:
| Code: |
OUTFIL FNAMES=OUT,OUTREC=(1,10,80:X)
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
fuadk84,
You make it very difficult to help you. If you hadn't said you couldn't use ICETOOL, I would have immediately pointed you to the "Join fields from two files record-by-record" Smart DFSORT Trick at:
www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
which would have shown you how to do what you wanted immediately. Many posts later, you showed an ICETOOL job even though you originally said you couldn't use ICETOOL. You said there was an error, but didn't show the error message. Subhasis then showed you the Smart DFSORT Trick that I would have told you about after your first post.
In the future, please try to post in such a way that you don't make it difficult for people to help you. |
|
| Back to top |
|
 |
fuadk84
New User
Joined: 16 Nov 2006 Posts: 10
|
|
|
|
sorry ..it was my mistake....actually I came to know that
i can use icetool later only....
Could you please explain what's happening in the following:
| Code: |
SPLICE FROM(CON) TO(OUT) ON(81,8,ZD) WITH(6,5) USING(CTL3)
//CTL1CNTL DD *
OUTFIL FNAMES=T3,OUTREC=(1,5,5Z,80:X,SEQNUM,8,ZD)
//CTL2CNTL DD *
OUTFIL FNAMES=T4,OUTREC=(5Z,6:1,5,80:X,SEQNUM,8,ZD)
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
First of all, subhasis's version of the job is not the best way to do it. It's overcomplicated. Here's a better version:
| Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
56789
BBBBB
CCCCC
/*
//IN2 DD *
11111
22222
33333
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(81,8,ZD) WITH(6,5) USING(CTL3)
//CTL1CNTL DD *
INREC OVERLAY=(81:SEQNUM,8,ZD)
//CTL2CNTL DD *
INREC BUILD=(6:1,5,81:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,BUILD=(1,80)
/*
|
The CTL1CNTL INREC statement adds a sequence number to each IN1 record in positions 81-88.
The CNTL2CNTL INREC statement puts IN2 positions 1-5 at output positions 6-10 and adds a sequence number in positions 81-88.
Here's what the T1 records look like after the two COPY operators are used:
| Code: |
56789 ... 00000001
BBBBB ... 00000002
CCCCC ... 00000003
11111 ... 00000001
22222 ... 00000002
33333 ... 00000003
|
New the SPLICE operator creates a spliced record for each pair of sequence numbers with the 1-5 field from the first record and the 6-10 field from the second record. The OUTFIL statement removes the sequence number. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|