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

How to copy one PS file to multiple PS files with same data?

1 Answers  


Explain the function of dd disp parameter?

0 Answers  


In JCL..for TIME Parameter was specified both JOB & STEP..which one is overrides

6 Answers   Satyam,


Do we need to code DCB parameters when using DISP position as MOD?

1 Answers   Accenture,


How much is memory space involved, when we code BLOCKSIZE,TRK & CYL ?

1 Answers  






What is the function of the steplib dd statement?

0 Answers  


How to check empty file in jcl?

4 Answers   Infosys,


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

0 Answers  


WORKING-STORAGE SECTION. 1 GROUP-ITEM. 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50. 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP. PROCEDURE DIVISION. MOVE ZERO TO GROUP-ITEM. ADD 50 TO AMOUNT-1. DISPLAY AMOUNT-1. STOP RUN.

1 Answers  


Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?

0 Answers   CGI, Verizon,


We are using 2 files , file one has data, file two is empty.Using jcl how can we find the other file is empty?

9 Answers   CSC, IBM,


how are instream data terminated?

3 Answers   Tech Mahindra,


Categories