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
how do you reference the rrds file formats from cobol programs
What is perform what is varying?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
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 are the various section in data division and briefly explain them.
i want a program using by if, evaluate , string, unstring, perform, occurs?
What are different data types in cobol?
How do you get the data to code the BMS macro?
What is a report item?
how do you reference the variable unblock file formats from cobol programs
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
In COBOL programming, what is PERFORM? What is VARYING?
How do you reference the fixed block file formats from cobol programs
) what is the difference between AID and HANDLE AID?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?