i have a string of 80 chars i want to replace 4th char with "a"?

Answers were Sorted based on User's Feedback



i have a string of 80 chars i want to replace 4th char with "a"?..

Answer / krishna

Move the sting in to a variable Eg to WS-String
then

Move 'a' to ws-string(4:1)

hope this will work

Is This Answer Correct ?    16 Yes 0 No

i have a string of 80 chars i want to replace 4th char with "a"?..

Answer / mchava

first move string 4th position to one variable

ex: string(4:1)=ws-string

then use inspect and replace words
ex: INSPECT STRING REPLACING WS-STRING BY 'a'
BEFORE SPACE/'.'/(end of the sting).

Is This Answer Correct ?    3 Yes 1 No

i have a string of 80 chars i want to replace 4th char with "a"?..

Answer / deepak dada, jaipur

not sure but

inspect string replacing string(4:1) by 'a'


might work

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More JCL Interview Questions

i have 10 steps in jcl program but i have to exicute only 2,4,6,8th and 10th ?how it's possible?

10 Answers   IBM,


Explain about LMMLIST�list a library's members

1 Answers  


What is a PROC? What is the difference between an instream and a catalogued PROC?

2 Answers  


can any one plzzzzzz tell the jcl code for creating ps using idcams

2 Answers   Fiserv,


I have a File that has duplicate records. I need only those records that occur more than thrice.

3 Answers  






How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?

0 Answers   IBM,


what is the difference between return code and maxcc?

2 Answers   iGate,


What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?

0 Answers  


What is the function of //jcllib statement?

0 Answers  


What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?

1 Answers  


How would I code JCL to copy a gdg data set G001v00 and create a gdg Data set G001v01

2 Answers  


What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?

3 Answers   IBM,


Categories