What is the difference between Verify & Index in PL/1?
Answer Posted / kanishk kumar
INDEX::
Returns the starting position of the string y within string
x; returns 0 if y not present in x.
>>--INDEX--(--x--,--y--)------------------------------------
------------><
Verify::
Returns the first position in string 1 where any element in
string 2 is not in string 1.
If all characters in x are
contained in y, result is zero.
>>--VERIFY--(--x--,--y--)-----------------------------------
------------><
Example: IF VERIFY(NAME,ALPHABET) THEN...;
DCL MAINSTR CHAR(6) INIT ('ANUK ');
DCL SUBSTRG CHAR(2) INIT ('NA');
RTN = VERIFY(MAINSTR, SUBSTRG);
Default search starts from 1st position.
RTN=3
| Is This Answer Correct ? | 15 Yes | 21 No |
Post New Answer View All Answers
Can I redefine an x(100) field with a field of x(200)?
Can you define a gdg?
Why is free space left in ksds dataset?
by using xpeditor if we want to debug the subpgm, how can you code in x-ped for mai-pgm n sub-pgm ?
Write about the self-referencing constraint?
Explain host variables?
What is the difference between hdam and hidam databases?
Where is the vsam ksds placed?
Can records be accessed randomly in esds?
Explain index cardinality?
what is unit testing ? on which basis you will write test case ?
What is drda ?
How IBM framework work?
Is the order of the when clause significant in an evaluate statement?
does anybody know about niit technologies ? how is that company ? any body working in that company ? please answer my question.I got selected in NIIT Technologies delhi.