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

Can we call instream to catalog and catalog to instream?

0 Answers  


What are the utility programs in jcl?

0 Answers  


How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?

2 Answers  


Write a JCL by using the below requirement: File1 =1, File2 =11 and output needs to come as File3 =111?

8 Answers   Saggezza,


List some valid operation codes in JCL

3 Answers  






wt will happen to the step of a job if u code COND=ONLY

5 Answers   ADP,


i have 5 steps to execute in that i want to skip 3nd step and start execute from forth step how can u do this.

7 Answers   Syntel,


How to DEBUG a JCL?

9 Answers   Satyam,


Suppose a proc step has a DD statement like //ABC DD DSN=TEST.FILE1,DISP=SHR DSN=TEST.FILE2,DISP=SHR and the above DD name is overridden from the JCL as given below //procstepname.ABC DD DSN=TEST.FILE3 - Will the DD statement now have just TEST.FILE3 or it will be TEST.FILE3 and TEST.FILE2? Suppose if it is overridden twice like //procstepname.ABC DD DSN=TEST.FILE3 //procstepname.ABC DD DSN=TEST.FILE4 Will this give a JCL error? If not, what will be final output?

2 Answers  


CAN ANYONE TELL ME WHAT IS "JOB-CARD"

4 Answers   Syntel,


How to execute 2nd and 4th steps among 5 steps in jcl proc?

0 Answers  


There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored.

2 Answers   Merrill Lynch,


Categories