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
Why would you use find and get rather than to obtain?
What are the different rules of SORT operation?
What are the different open modes available in cobol?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
IF I mention stop run in CICS what happens?
Name some of the examples of COBOl 11?
Explain about different table spaces.
how do you reference the fixed unblock file formats from cobol programs
How many sections are there in data division in COBOL?
How are the next sentence and continue different from each other?
What is report-item in COBOL?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
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 difference between static and dynamic call in cobol?
HOw can I get the negative sign while deduct high value from low value