IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help with reformatting


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
santosh18

New User


Joined: 23 Jul 2009
Posts: 1
Location: Earth

PostPosted: Mon Oct 28, 2013 7:57 pm
Reply with quote

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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 28, 2013 8:13 pm
Reply with quote

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

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Oct 28, 2013 8:17 pm
Reply with quote

What is the sort product you use and version ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts REFORMATTING WITH JFY CLOBBERING OUTP... DFSORT/ICETOOL 12
No new posts Reformatting and adding additional fi... SYNCSORT 6
No new posts Reformatting field, error while using... DFSORT/ICETOOL 7
No new posts Reformatting a VB record with multipl... DFSORT/ICETOOL 8
No new posts Reformatting the input with leading z... DFSORT/ICETOOL 3
Search our Forums:

Back to Top