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

Explain the function of dd disp parameter?

0 Answers  


what is alternate index?

1 Answers  


A STEP has more than 1 file as INPUT. And we have to put all these records int 1 output file. How to do ? //InputF  DD DSN=ID.File1              DSN=ID.File2              DSN=ID.File3

1 Answers   FIS,


Name what parameter directs the output of the job log dataset?

0 Answers  


How to do automated restart when a job abend?

0 Answers  






The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The DISP in the JCL is SHR and the program opens the file in EXTEND mode. What happens ?

3 Answers  


In SPACE,what is directory,RLSE

6 Answers   TCS,


While using SORT FILES =NONE,XSUM I am getting error "ICE172A E XSUM IS NOT SUPPORTED - USE ICETOOL SELECT IF APPROPRIATE"..I want to write duplicate records a a serparte file..how i can do tht?

3 Answers   Steria,


If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?

2 Answers   IBM,


TIME parameter in JOB statement or EXEC statement specifies What type of time (CPU time or execution time)?

5 Answers   CTS,


How to pass data to a program that is coded in an exec statement?

0 Answers  


ihave ten flatfile in that iwant to concatinate all the files except file 5,6 into output file by uing jcl? how to do this? give me detail yntax for tis?

4 Answers   IBM,






Categories