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
What is the Purpose of Pointer in the string?
State the various causes of s0c1, s0c5 and s0c7.
Which is not true about evaluate statement
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Why occurs cannot be used in 01 level in COBOL?
What is link edit in cobol?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
IF I mention stop run in CICS what happens?
Can we redefine the field of x(200) to less than 200?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad