View previous topic :: View next topic
|
Author |
Message |
santosh18
New User
Joined: 23 Jul 2009 Posts: 1 Location: Earth
|
|
|
|
This is My Input
Code: |
DSNT362I -D2D6 DATABASE = STPSA1PT STATUS = RW 0001
DSNT362I -D2D6 DATABASE = STPSA2PT STATUS = RW 0002
PT000120 TS 0001 RW,RECP
PT000121 TS 0001 RW,RECP
PT000122 TS 0001 RW,RECP
PT000400 TS 0001 RW,CHKP
DSNT362I -D2D6 DATABASE = ACPHC1AM STATUS = RW 0003
AM000180 TS 0001 RW,CHKP
AM000220 TS 0001 RW,CHKP
DSNT362I -D2D6 DATABASE = ACPHC1B7 STATUS = RW 0004
B7000070 TS RW,CHKP
B7000110 TS RW,CHKP
|
And the output I am expecting is
Code: |
STPSA2PT.PT000120
STPSA2PT.PT000121
STPSA2PT.PT000122
STPSA2PT.PT000400
ACPHC1AM.AM000180
ACPHC1AM.AM000220
ACPHC1B7.B7000070
ACPHC1B7.B7000110
|
For every database there might be multiple Tablespace (TS). I need this information in a single line.
My Approach was to tag all the "DATABASE =" with a sequence (you can see it in the right side cornor) and also the corresponding TS rows with a sequence. This way I can use the JOINKEY to join on sequence number and get the output in a single line.
Struck with the sequence number generation for TS rows. Any pointers here? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have a look at IFTHEN=(WHEN=GROUP with BEGIN for the DSNT362I. You PUSH the database-name into a fixed position. Identify a "tablepace record" and use BUILD to format the data how you want it. Use OUTFIL OMIT= to get rid of the DSNT362I records. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
What is the sort product you use and version ? |
|
Back to top |
|
|
|