How to delete a front spaces in a data-name/variable in
cobol
Example:-
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
MOVE data-name-1 to data-name-2.
would like the value of data-name-2 is "cobol language".
Answer Posted / deepak dada
01 data-name-1 pic value " cobol language" justified
right.
01 data-nane-2 pic(20).
01 data-name-3 redifines data-name-2 pic x(14).
move data-name-1 to data-name-3.
display data-name-3.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How can you get the ksds file records into your cobol program?
How do you reference the fixed block file formats from cobol programs
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
how do you reference the printer file formats from cobol programs
Can you please let me know the centre name of INS certification in Kolkata.
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 inspect in cobol ?
Name the sections present in data division.
What is the difference between comp and comp-3 usage?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What is comp-1 and comp-2?
What is the difference between Call and a Link?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
Write a program to enter and display the names of students in a class using the occurs clause.