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 

replace a char in the string(similar-INSPECT verb in cobol)

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


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 11:12 am    Post subject: replace a char in the string(similar-INSPECT verb in cobol) Reply with quote

I need to replace a particular character(DOT) in a string of 25 characters. Similar to inspect verb. when i download the file to csv format, the alignment is changed due to the record 1116706-313.13.

Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
200715,20,DDD,   4152,F1,20,2CLS,1116706-225P13           ,P,   ,CCC21    ,  ,
200705,20,CCC,   2988,F1,20,2CLS,2226706-312P12           ,P,   ,BBB21    ,  ,
200705,20,BBB,   4141,F1,20,2CLS,1116706-313.13           ,P,   ,AAA21    ,  ,
200705,20,AAA,   2989,F1,20,2CLS,2226706-313P12           ,P,   ,FFF62    ,  ,


check for 34-59(25 characters), if there is any DOT '.' in between change it to spaces.I know how to change the entire string to another string. but similar to INSPECT in cobol, not sure wut will be while using the sort utility.

Or is there any way to display the value with DOT's in csv file.
can any one pls provide the sol.

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


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

PostPosted: Mon May 21, 2007 11:21 am    Post subject: Reply with quote

radkrish,

Try this sort card

Code:

//SYSIN DD *                           
 SORT FIELDS=COPY                     
 OUTREC FIELDS=(01,33,                 
                34,25,TRAN=ALTSEQ,     
                59,22)                 
 ALTSEQ CODE=(4B40)                   
/*                                     


The above control cards will replace any X'4B' (DOT in hex) to spaces from pos 34 thru 58.

Hope this helps...

Cheers

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


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 11:21 am    Post subject: Reply with quote

Please move this topic to UTILITIES if this should not be in JCL topic. thanks.

For the above problem, wil it work if we change the hexadecimal value of DOT unless the directly resolving it. Also, provide me the value too.

thanks,
radkrish
Back to top
View user's profile Send private message
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 11:26 am    Post subject: Reply with quote

I guess, we posted in same time. Thanks, Kolusu. I checked it, but it didnt replaced with spaces.

Pls provide me hex value of '-' and ' ' (dash and spaces). I think we need to provide the replaced char.

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


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

PostPosted: Mon May 21, 2007 11:52 am    Post subject: Reply with quote

Quote:

Pls provide me hex value of '-' and ' ' (dash and spaces). I think we need to provide the replaced char.


1. Open an ispf editor
2. Type in '-' and ' '
3. Type Hex on at the command prompt
4. read the hex value of each character reading vertically.

Kolusu


Ps: it is really sad that you cannot even look up the hex characters Crying or Very sad
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 1:42 pm    Post subject: Reply with quote

Even, Iam really sad that I can't look up the hex characters becoz HEX ON not allowed/not working at my end. I will check some websites.

thanks
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon May 21, 2007 1:44 pm    Post subject: Reply with quote

who the heck is going to know that for 10 - no - 5 seconds you have turned hex on then turned it off again? what shop would stop you using a basic tool?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon May 21, 2007 1:55 pm    Post subject: Reply with quote

Quote:

Even, Iam really sad that I can't look up the hex characters becoz HEX ON not allowed/not working at my end. I will check some websites.


It is really surprising that you cannot issue HEX on. Are you issuing the hex on command in SDSF? or in ISPF?

Here is the link for EBCDIC collating sequence and their hex values

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR10/APPENDIX1.3.1?DT=20020920180651

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


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 2:00 pm    Post subject: Reply with quote

sorry Nic. we have been struggling like this. not sure what is the problem.In my previous shop, I have utilised all basic mf commands. In this shop here, its been real heck for us. In the past, we were not able to access even QW help. now we have it. we have requested our Admin to do the needful for some more basic commands. Real hectic to be without basic cmds and sorry to trouble you ppl.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon May 21, 2007 3:38 pm    Post subject: Reply with quote

Radkrish,

QW is a different thing....It is not a mainframe command...It is an utility and your shop has to pay for it. So, not all shops offer that. HEX ON is not an utility which costs any penny for your shop. Either, you might be typing HEX at the wrong screen / check with your system admin folks abt that. They should be able to resolve that.

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
radkrish
Beginner


Joined: 12 Aug 2005
Posts: 102
Topics: 19

PostPosted: Mon May 21, 2007 4:11 pm    Post subject: Reply with quote

Thanks, Photom. Thanks for your reply. Iam entering it in correct screen. Iam familar with this command as I have used the cmd several times in my prev shop. I had escalated it already for our team. we are following it up with admin.

Thanks for all your replies.

regds,
radkrish
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 -> 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