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 / mayank rastogi
Use following code: It'll work
MOVE 'I N D I A' TO WS-NAME.
UNSTRING WS-NAME DELIMITED BY ' '
INTO WS-CHAR1, WS-CHAR2, WS-CHAR3, WS-CHAR4, WS-CHAR5.
STRING WS-CHAR1, WS-CHAR2, WS-CHAR3, WS-CHAR4, WS-CHAR5
DELIMITED BY SIZE INTO WS-NAME1.
ws-name1 is the new variable that will contain INDIA
without any spaces
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
Write the code to count the sum of n natural numbers.
What are the rules of the move verb?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
How to print 10 to 1 if the input have only 10 digit number?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
) How do u handle errors in BMS macro
What is a scope terminator give example?
how do you reference the variable unblock file formats from cobol programs
What is amode(24)?
What is the difference between PIC 9.99 and PIC9v99?
Why did you choose to work with ibm mainframe cobol programming?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How many sections are there in data division in COBOL?
Give some examples of command terminators?
how to convert the recors form vsam file to db2 table tru file aid