COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'
Answer Posted / meghraj hulawale
Data Division.
w-s-s.
77 str pic x (6) value 'BOMBAY'.
77 revstr pic x (6).
77 I pic 9 (1).
77 J pic 9 (1) value 1.
77 cnt pic 9 (1).
Procedure Division.
inspect str tallying cnt for all characters before initial space.
move cnt to I.
perform until I < 1
move str (I:1) to revstr (J:1)
add 1 to J
subtract 1 from I
end-perform.
Display revstr.
stop run.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is the difference between comp and comp-3?
What are the pertinent COBOL commands?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
How you can characterize tables in cobol?
) How do u handle errors in BMS macro?
What type of SDLC u followed? Why?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
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
what is search and searchall?what is the diffrence between them?give an best example?
Explain what you understand by passing by value.
Define static linking and dynamic linking.
Mention the guidelines to write a structured cobol program?