how we can reverse the string in the cobol for example
satheesh can be reveresed as hseehtas
Answer Posted / paul
DATA DIVISION.
WORKING-STORAGE SECTION.
01 I PIC 9.
01 J PIC 9.
01 ST1 PIC X(5).
01 ST2 PIC X(5).
PROCEDURE DIVISION.
MOVE 1 TO I.
MOVE 'KOTI' TO ST1.
PARA-A.
PERFORM PARA-B VARYING J FROM 5 BY -1 UNTIL J = 0.
DISPLAY 'STRING REVERSE' ST2.
STOP RUN.
PARA-B.
MOVE ST1(I:1) TO ST2(J:1).
ADD 1 TO I.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
) How do u handle errors in BMS macro?
What is the difference between PIC 9.99 and PIC9v99?
What is length is cobol?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
What are the various section in data division and briefly explain them.
How can you get the ksds file records into your cobol program?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What are all the divisions of a COBOL program?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
How many sections are there in data division in COBOL?