I've one string with spaces ( I N D I A ). My question is I
want remove the spaces & combine in to single string without
space (INDIA).How we can write the cobol program & wich
options we need to use. Please let me know.
Answer Posted / uday
Through reference modification we can acheive and it is the
best way.
In Working storage section
01 ws-india pic x(10) value ' I N D I A '
01 ws-india-f pic x(05).
In procedure division
Perform varying ws-i from 1 by 1 until wi-i > 20
If ws-india(ws-i:1) = spaces
continue
Else
move ws-india(ws-i:1)to ws-india-f
End-if
End-perform
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
How do you get the data to code the BMS macro?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
Name the divisions, which are available in a cobol program?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
what happens if parmparameter passes zero bytes to the program
What is an in line perform? When would you use it? Anything else you wish to say about it.
Are you comfortable in cobol or jcl?
What is length is cobol?
what is the use of outrecord?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Explain about different table spaces.
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.