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 

Problem with Inspect/Replacing

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


Joined: 12 Sep 2008
Posts: 6
Topics: 4
Location: Chennai

PostPosted: Tue May 05, 2009 10:18 am    Post subject: Problem with Inspect/Replacing Reply with quote

We are migrating IDMS database from BS2000 to z/OS. When we are migrating the COBOL source the following piece of code is throwing me compilation error.

Code:
INSPECT WA-CONSTITUANT REPLACING ALL "- " BY " "


Since my REPLACING and BY operands are of different lengths it is thowing me compilation errors.

In BS2000 COBOL, it allows even the lengths are different. When I was discussing with client they are saying like aim of the INSPECT function (in this case) is to reduce the length of the string in oder to be able to display the info on the screen.

Can you guys suggest some way to overcome this situation?

Thanks
_________________
Regards,
Anil Manepalli
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: Tue May 05, 2009 10:42 am    Post subject: Reply with quote

mm_ak81,

Inspect replace allows only the replacement of like sized values. You can use a perform to check 2 bytes at a time and move the values

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming 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