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 / arpan

Probably you can write SPACES instead of ' ' in the
UNSTRING statement.

UNSTRING WS-NAME DELIMITED BY SPACES
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.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it necessary that file needs to be opened in I-O mode for REWRITE?

995


i need a small 3d program using inline and outline.

1903


What is rmode(any) ?

899


What is the difference between PIC 9.99 and 9v99 in COBOL?

983


What is the usage of comp fields in cobol?

877


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2141


What do you understand by psb and acb?

846


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

888


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1240


What is the local-storage section?

889


Why did you choose to work with ibm mainframe cobol programming?

850


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?

5599


What is amode(24)?

884


What are all the divisions of a COBOL program?

899


i want a program using by if, evaluate , string, unstring, perform, occurs?

4345