MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to make a long data line look vertical

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Dec 03, 2009 6:28 am    Post subject: how to make a long data line look vertical Reply with quote

Hi,

I have a dataset (RECFM=FB, LRECL=1092) with 2 records in it.

Code:

XXX010..FYADL FYAEQ OYAFN OYAHN FYAH3 OYAWO FYAXG OYA64 OYB34 OYB35 OYCF5 OYCX8 OYC68 FYDT4 OYD7A FYE7Y OYGAR FYJ67 FYKRE
YYY202..FYADL FYAEQ OYAFN OYAHN FYAH3 OYATH OYAWO FYAXG OYA64 OYB34 OYB35 OYCF5


I want the above data to appear as shown below in OUTPUT:

Code:

XXX010..
FYADL
FYAEQ
OYAFN
OYAHN
FYAH3
OYAWO
FYAXG
OYA64
OYB34
OYB35
OYCF5
OYCX8
OYC68
FYDT4
OYD7A
FYE7Y
OYGAR
FYJ67
FYKRE
YYY202..
FYADL
FYAEQ
OYAFN
OYAHN
FYAH3
OYATH
OYAWO
FYAXG
OYA64
OYB34
OYB35
OYCF5


Note: Though the string looks short it can go up to full length ie. 1092. So, how to make it vertical looking data?

Please help.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 03, 2009 11:24 am    Post subject: Reply with quote

mf_user,

Use the following DFSORT control cards. The / is used to split the record and write it as a new record. I have shown only few you can extend it to the full length of 1092
Code:

//SYSIN    DD *                                               
  OPTION COPY                                                 
  OUTFIL BUILD=(1,8,/,9,5,/,15,5,/,21,5,/,27,5,/,33,5,/,39,5,/,
                45,5,/,51,5,/,57,5,/,63,5)                     
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Dec 03, 2009 11:30 am    Post subject: Thx Reply with quote

Kolusu, Thanks for the info.

How do we determine the exact length of full string because one string is long and one is short !

Please advise.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 03, 2009 11:56 am    Post subject: Reply with quote

mf_user,

you mean the values XXX010..FYADL FYAEQ OYAFN OYAHN FYAH3 OYAWO can be of variable length?

If so how do you determine the end and start of each field? Is there a delimiter?
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Fri Dec 04, 2009 4:20 am    Post subject: got ur point Reply with quote

Ok....I got your question. Though only five character appear, it is a six character field and 6th character will be always a space. This way a string will end with space.

Thanks.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Dec 04, 2009 10:15 am    Post subject: Reply with quote

mf_user,

If the length of the string is fixed why cant you simply code as shown above? you will need another pass to get rid of the all spaces records.

Code:

//STEP0100 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//IN       DD DSN=Your input 1092 fb file,
//            DISP=SHR
//T1       DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)         
//OUT      DD SYSOUT=*                                             
//TOOLIN   DD *                                                     
  COPY FROM(IN) USING(CTL1)                                         
  COPY FROM(T1) USING(CTL2)                                         
//CTL1CNTL DD *                                                     
  OUTFIL FNAMES=T1,                                                 
  BUILD=(1,8,/,9,5,/,15,5,/,21,5,/,27,5,/,33,5,/,39,5,/,           
         45,5,/,51,5,/,57,5,/,63,5,69,5,/,75,5..til 1092)
//*                                                                 
//CTL2CNTL DD *                                                     
  OMIT COND=(1,5,CH,EQ,C' ')                                       
  OUTFIL FNAMES=OUT                                                 
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Dec 04, 2009 1:00 pm    Post subject: Reply with quote

if the data set is not large, you can also run an ISPF edit macro that uses TEXT_FLOW (I think - look it up) to flow the data. For this, flowing to the 3rd column should work.
_________________
New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html.
Back to top
View user's profile Send private message Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Tue Dec 08, 2009 11:18 am    Post subject: Thx Reply with quote

Kolusu, thank you for the new solution.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group