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
Write a program that uses move corresponding.
Why did you choose to work with ibm mainframe cobol programming?
What rules are followed by the search verb.
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
What is the usage of comp fields in cobol?
What are the pertinent COBOL commands?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What are the various section in data division and briefly explain them.
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the difference between Global and External Variables?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How arrays can be defined in COBOL?
How do you define a variable of comp-1 and comp-2?
What kind of error is trapped by on size error option?