Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Get all those ps contents in to one ps and in the same row
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Thu Nov 23, 2006 12:45 pm    Post subject: Get all those ps contents in to one ps and in the same row
Reply with quote

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
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Nov 23, 2006 3:12 pm    Post subject:
Reply with quote

You can use IEBGENER.

O.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Nov 23, 2006 3:29 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

Hi,

Find the Link which is already disccussed in this fourm.

http://ibmmainframes.com/viewtopic.php?t=14793
Back to top
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Thu Nov 23, 2006 4:56 pm    Post subject: how to merge records laterally
Reply with quote

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
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Thu Nov 23, 2006 4:58 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

surya_pathaus wrote:
Hi,

Find the Link which is already disccussed in this fourm.

http://ibmmainframes.com/viewtopic.php?t=14793


hi.. cant use ICETOOL...is there any other way....
Back to top
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Thu Nov 23, 2006 5:00 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Nov 23, 2006 5:20 pm    Post subject:
Reply with quote

IEBGENER is a standard MVS utility. You can read more about it in the fine manual.

O.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Nov 23, 2006 9:42 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Nov 24, 2006 12:52 am    Post subject:
Reply with quote

I believe that concatanating datasets in SYSUT1 will result in one SYSUT2.

O.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 24, 2006 1:41 am    Post subject:
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Nov 24, 2006 2:01 am    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 24, 2006 2:51 am    Post subject:
Reply with quote

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). icon_biggrin.gif

Happy Thanksgiving to you, too.
Back to top
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Fri Nov 24, 2006 2:48 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

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
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Fri Nov 24, 2006 3:36 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

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
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Fri Nov 24, 2006 4:13 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

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
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Fri Nov 24, 2006 5:05 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

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
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Fri Nov 24, 2006 6:12 pm    Post subject: Re: Get all those ps contents in to one ps and in the same r
Reply with quote

thank you... icon_smile.gif icon_smile.gif its workin fine....
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 24, 2006 10:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Nov 24, 2006 10:27 pm    Post subject:
Reply with quote

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:

http://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
View user's profile Send private message
fuadk84

New User


Joined: 16 Nov 2006
Posts: 10

PostPosted: Sun Nov 26, 2006 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Consolidating and summing file contents Kevin Lindsley SYNCSORT 14 Thu Jun 09, 2016 5:24 am
No new posts Read contents of PS file scorp_rahul23 JCL & VSAM 3 Mon Mar 28, 2016 10:28 pm
No new posts Combining contents of 2 files in to s... sprikitik SYNCSORT 1 Fri Jan 22, 2016 2:16 pm
No new posts how to copy file based on contents of... norm.flynn JCL & VSAM 11 Thu Oct 31, 2013 10:17 pm
No new posts Copying File Contents into a Table Bharath RajaramSridharan CLIST & REXX 9 Thu Apr 18, 2013 7:15 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us