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 |
when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible
I know my query will return more than one row but I don't want cursor what should I do?
What is 88 level used for ?
Can a Search can be done on a table with or without Index?
how to convert the recors form vsam file to db2 table tru file aid
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 want Display WS-VARX and WS-VARN?
Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?
where will we code call by content and call by reference dude pls reply soon ?
Write a cobol program making use of the redefine clause.
what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.
Define REDEFINE clause and Is it possible to have the redefine clause anywhere in the working storage section for a data name?
Is it possible to mutliply a comp variable with an comp-3 variable. Will there be any error if i do it?