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 / varun v
we can use "Inspect Tallying" also for the same. I guess
this one is more effective.
Working storage Variable:
01 data-name-1 PIC x(20) value " cobol language".
01 data-name-2 PIC x(20).
01 WS-TALLY1 PIC 9(02) VALUE ZERO.
Procedure Dvision:
Inspect data-name-1 Tallying WS-TALLY1 for leading
spaces
Move data-name-1(WS-TALLY1+1 : 20-WS-TALLY1) to
data-name-2.
Now data-name-2 should have
Value 'cobol language'.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
HOw can I get the negative sign while deduct high value from low value
How you can characterize tables in cobol?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
i need a small 3d program using inline and outline.
When is inspect verb is used in cobol?
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What is comp-1 and comp-2?
) what is the difference between AID and HANDLE AID?
Difference between cobol and cobol-ii?
What is a report item?
What kind of error is trapped by on size error option?
What are various search techniques in cobol? Explain.