How to delete leading spaces/blank in COBOL ?
Example:- 01 data-name-1 pic x(220) " English is a
language".
I would like to delete leading spaces.
Answer Posted / minarul
you can do this by defining another varible with JUSTIFIED
RIGHT clause. then move the value from data-name-1 to that
varible. You have to define the picture clause of that
varible with proper length : below code will exactly do
that:
01 data-name-1 pic x(220) " English is a language".
01 CHR6 PIC X(217) JUSTIFIED RIGHT.
now do a move from data-name-1 to CHR6 and then disolay
the content of CHR6
| Is This Answer Correct ? | 20 Yes | 33 No |
Post New Answer View All Answers
In COBOL, what is the different between index and subscript?
What is rmode(any) ?
Explain the configuration section of a cobol program with examples of syntax.
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
What is Pic 9v99 Indicates in COBOL?
how do you reference the rrds file formats from cobol programs
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?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What is rmode(24)
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
how do you reference the printer file formats from cobol programs
What is the difference between comp and comp-3?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What is cobol?
how do you reference the variable block file formats from cobol programs