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
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
Write down the divisions of cobol program?
Write some characteristics of cobol as means of business language.
how can i see junk values in dclgen or in hostvariable of comp ?
What are the different types of condition in cobol and write their forms.
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
How do define dynamic array in cobol.
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
What are the different rules to perform a Search?
What are the different data types in cobol?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
How are the next sentence and continue different from each other?
) How do u handle errors in BMS macro?