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 |
I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you
What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?
What is difference between comp & comp-4?
Write a program to explain size error.
Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.
What is level 66 used for ?
In an EVALUTE statement is the order of the WHEN clauses significant?
How include time & date in the report generation in cobol programing?
how to convert vsam table into DB2 table?
What is XDC ?
why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.
what is qualification on occurs clause?