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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can characterize tables in cobol?

708


What is a scope terminator give example?

652


how do you reference the ksds vsam file formats from cobol programs

649


What is the difference between comp and comp-3 usage?

669


What is the difference between PIC 9.99 and PIC9v99?

771






What is the default value(s) for an initialize? What keyword will allow for an override of the default?

650


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

668


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1921


Can you please let me know the centre name of INS certification in Kolkata.

1708


What is the difference between Call and a Link?

694


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.

1772


how do you reference the rrds file formats from cobol programs

789


What type of SDLC u followed? Why?

1514


) how do u code after getting data?

1578


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

699