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
 

 

Replace space with %20

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Mar 10, 2010 4:46 pm    Post subject: Replace space with %20
Reply with quote

I'm trying to replace space with %20 in a variable length file.

input ==>

ma Jane Abson|ABSOE|BEUNEA1|CLKBCS|

output ==>

ma%20Jane%20Abson|ABSOE|BEUNEA1|CLKBCS|
Back to top
View user's profile Send private message

shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Mar 10, 2010 6:15 pm    Post subject:
Reply with quote

Hello ,

Can any one please respond . I wish to replace all spaces in the file with %20 .

Here is the example

Input ==>

ma Jane Abson|ABSOE |BEUNEA1
Andy Cox|AC2 |BMUAC2

Output==>
ma%20Jane%20Abson|ABSOE |BEUNEA1
Andy%20Cox|AC2%20|BMUAC2

Should shift right to accomadate all the data

Thanks in advance
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Mar 10, 2010 6:31 pm    Post subject: Reply to: Replace space with %20
Reply with quote

soliciting for an answer is usually considered bad manners
( especially after one hour and a half from the initial post )

if You had looked around a bit You would have seen that
Frank and Kolusu work in a different time zone ( San Jose, USA )

so it' s up to You to convert 9AM San Jose, USA time to Your local time
and find at what time ( Your time ) they might show up at the work place
( maybe a bit earlier ... )

according to
http://www.timeanddate.com/worldclock/custom.html?sort=1
right now on the USA western coast is between 5 and 6 AM
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Mar 10, 2010 10:18 pm    Post subject:
Reply with quote

shr_amar wrote:
Hello ,

Can any one please respond . I wish to replace all spaces in the file with %20 .

Here is the example

Input ==>

ma Jane Abson|ABSOE |BEUNEA1
Andy Cox|AC2 |BMUAC2

Output==>
ma%20Jane%20Abson|ABSOE |BEUNEA1
Andy%20Cox|AC2%20|BMUAC2

Should shift right to accomadate all the data

Thanks in advance

shr_amar,

Why aren't you replacing the spaces to %20 at the end of each record? Do you want to restrict the change only to the data part? What is the LRECL and RECFM of the input dataset?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Mar 10, 2010 10:58 pm    Post subject:
Reply with quote

shr_amar,

Given that you're in such a rush to get an answer, you should have spent more time stating your requirement clearly.

I can only guess that you want to replace each group of "interior" blanks with a %20. If so, you can use DFSORT control statements like this (I assumed your input file has RECFM=FB and LRECL=80):

Code:

  OPTION COPY                                     
  INREC BUILD=(1,80,SQZ=(SHIFT=LEFT,MID=C'%20'))   


The output would be:

Code:

ma%20Jane%20Abson|ABSOE%20|BEUNEA1
Andy%20Cox|AC2%20|BMUAC2           


which does NOT correspond to what you showed as the expected output, but would make more sense.

That's the best I can do based on the information you provided.
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Thu Mar 11, 2010 10:52 am    Post subject:
Reply with quote

Frank ,

I appreciate the valuable suggestion you have provided . Due to short time i had pinged one after other.

However many thanks for the solution it is working fine .

Thanks to all .

Rgrds
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am


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