i have a string of 80 chars i want to replace 4th char with "a"?
Answer Posted / 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 |
Post New Answer View All Answers
Does jcl support automatic restart?
Explain the purpose of the dd keylen parameter?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.
Is acct parameter mandatory?
what is the purpose of coding class parameter in job statement?
Can we use DISP=SHR in output file in JCL
What is the function of the dd avgrec keyword in sms datasets?
Are there any set of rules for the names of the steps used in a job? What are they?
Explain how can return codes be tested before execution of a job step?
when does a dataset go uncataloged?
what is the resolution for sb37 error
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*
i want to store 20 digits . how will u do it in cobol ?