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 

Strip Records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Sun Mar 08, 2009 2:36 pm    Post subject: Strip Records Reply with quote

Hi,
I have an reqiurement i need to strip spaces & other unwanted data from file . It will be greatful if anyone can provide me the rexx code

Input file is
Code:



V001.00.....CCDDDA  0F2FL6540211200914295880087723354010410001465
            CCDDDA  0F2FM1540211200914300060089272154010410001465
            CCDDDA  0F2FM0540211200914300050028872454010410001465
V001.00.....CCDDDA  0F2FL6540211200914295880087723354010410001465
            CCDDDA  0F2FM1540211200914300060089272154010410001465
V001.00.....CCDDD   002H92540211200914244190087779125412343802812
            CCDDD   002H92540211200914245400087779125412343802942
            CCDDD   002H92540211200914250040087779125412343803002




output should be

Code:



CCDDDA  0F2FL6540211200914295880087723354010410001465
CCDDDA  0F2FM1540211200914300060089272154010410001465
CCDDDA  0F2FM0540211200914300050028872454010410001465
CCDDDA  0F2FL6540211200914295880087723354010410001465
CCDDDA  0F2FM1540211200914300060089272154010410001465
CCDDD   002H92540211200914244190087779125412343802812
CCDDD   002H92540211200914245400087779125412343802942
CCDDD   002H92540211200914250040087779125412343803002

Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Mar 08, 2009 3:13 pm    Post subject: Reply with quote

sivafdms,

Isn't this a similar question to this one which you have started here?

http://www.mvsforums.com/helpboards/viewtopic.php?t=10564

If you are not clear about the DCB properties how can you expect people to help you?

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: Sun Mar 08, 2009 10:37 pm    Post subject: Reply with quote

since this is in the ISPF section, I assume it is a request for an ISPF edit macro. Something like this should work (assuming there is no @ character in the data):

Code:
/* REXX */ Address isredit
'macro'
'c " " "@" all'
'c "@" "" all 1 13' /* note no space between 2nd set of double quotes */
'c "@" " " ALL'


This is much more efficient than looping and shifting each line. If you don't know what character you can choose (@ in my example), you can add logic to search for an unused hex character. If none can be found, you can add logic to do this a different way, most likely with a shifting (( loop or a simple get/change/replace for each line. also, since this is a data file, depending on your needs, you may want to add a PRESERVE ON command in there too.
_________________
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
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Sun Mar 08, 2009 11:05 pm    Post subject: Reply with quote

kolusu,

Yes this is the same question i asked in Utilites section.. but i want to try same thing with rexx.Generally we assume if the DCB parameters are not given we consider it as FB as RECFM & LRECL = 80

semigeezer,
Thanks..

I will try this and let u know..


Thanks,
Siva
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF 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