Find a position in variable and update.
-
- New Member
- Posts: 6
- Joined: Fri Jan 17, 2014 2:04 pm
Find a position in variable and update.
Hi,
In a COBOL
Variable1 PIC X(36) value '0123456789abcdefghijklmnopqrstuvwxyz'.
I want to firstly search the character, for example 'c', later want to update the character 'c' to '$'. In the output i need to display, the character position, chrrent value and the replaced value - how should I proceed for this.
Thank you
In a COBOL
Variable1 PIC X(36) value '0123456789abcdefghijklmnopqrstuvwxyz'.
I want to firstly search the character, for example 'c', later want to update the character 'c' to '$'. In the output i need to display, the character position, chrrent value and the replaced value - how should I proceed for this.
Thank you
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Find a position in variable and update.
Just trying to understand :
Do you want to replace all 'c' in the given string?
Do you want to replace all 'c' in the given string?
zprogrammer
-
- New Member
- Posts: 6
- Joined: Fri Jan 17, 2014 2:04 pm
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
-
- New Member
- Posts: 6
- Joined: Fri Jan 17, 2014 2:04 pm
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute