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
How many bytes S(8) comp field occupy and its maximum value?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
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...)
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Can we redefine the field of x(200) to less than 200?
) how do u code after getting data?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
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
how can i see junk values in dclgen or in hostvariable of comp ?
HOw can I get the negative sign while deduct high value from low value
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How do you reference the fixed block file formats from cobol programs
What are various search techniques in cobol? Explain.
Can you please let me know the centre name of INS certification in Kolkata.