01 text-data pic x(100).
move 'xyzdbfrjjg u' to text-data.
how to find the value of last index of text-data?

Answers were Sorted based on User's Feedback



01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of las..

Answer / billyboyo

Presumably you mean the last character? Redefine the field
as OCCURS 100 PIC X. Start your subscript/index at
the "end" and work backwards to find the first non-blank
character. Careful if the whole field is blank, or if there
are no blanks.

Is This Answer Correct ?    3 Yes 0 No

01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of las..

Answer / krishna chaitanya

cana ny one post a code for that ,

thanks in advance

krishna

Is This Answer Correct ?    0 Yes 0 No

01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of las..

Answer / kumar

By using UNSTRING Verb we can do

UNSTRING text-data DELIMITED BY ' ' INTO ws-f1 (o/p varible)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

Which is not true about evaluate statement

0 Answers  


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.

7 Answers   Financial Services,


Define in-line perform?

1 Answers  


88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above

5 Answers   TCS,


suppose a cobol programme A calling programme B,C and D. If C undergoes some change what if A,B,C,D need to be recompiled or only C nee to be recompliled.

2 Answers   IBM,






What are the ways you can generate a copybook?

2 Answers  


explain sorting techniques in cobol program?

0 Answers  


For rewrite, why is it mandatory that file needs to be opened?

0 Answers  


01 A pic 9(100) find record length of it

6 Answers   TCS,


period is missing in the cobol program which error we getting

5 Answers   TCS, Tesco,


when COMP-3 is preferrable?

3 Answers   Patni,


What is comp-1 and comp-2?

0 Answers  


Categories