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
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 |
cana ny one post a code for that ,
thanks in advance
krishna
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
HOW TO MOVE REDEFINES CLAUSE FROM INPUT TO OUTPUT ?
What is the difference between a binary search and a sequential search?
Can the OCCURS clause be at the 01 level?
What are 77 levels used for?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
How to read a 100 record from a file through cobol?
I have put two write operations in a single para for two different conditions.Will that lead to an abend or run successfully and write two records?
where will we code call by content and call by reference dude pls reply soon ?
which one is the best of com and com-3.using of real time ?
What divisions, sections and paragraphs are mandatory for a COBOL program?
I want to declare a field with data type Double in my COBOL program. how shall i do that ?
input:-AABBCCDDEFGHIIJ output:- ABCDEFGHIJ Here in input we hav the duplicate characters i.e repeating characters.SO we should eliminate the duplicate characters and should display the output in ascending order.