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
 

 

Help with reformatting

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Help with reformatting
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Oct 28, 2013 8:13 pm    Post subject: Reply to: Help with reformatting
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

Moderator


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

PostPosted: Mon Oct 28, 2013 8:17 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reformatting field, error while using... dheeraj.ramchandani DFSORT/ICETOOL 7 Thu Nov 05, 2015 8:30 pm
No new posts Reformatting a VB record with multipl... marc_holmes DFSORT/ICETOOL 8 Wed Jul 16, 2014 12:30 pm
No new posts Reformatting the input with leading z... venkatprasana DFSORT/ICETOOL 3 Wed Jan 08, 2014 12:25 pm
No new posts Conditional reformatting the output f... abdul.faras DFSORT/ICETOOL 2 Sat Apr 07, 2012 12:10 pm
No new posts SORT - Reformatting the input file in... gcicchet DFSORT/ICETOOL 5 Sat Mar 24, 2012 3:20 pm


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