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
What are the mainframe computing pros and cons?
List the type of locks?
what is the meaning of ssrange and nossrange?
Write the difference between hidam and hdam databases?
How many bytes will a s9(8) comp field occupy ?
What is the term “where” for?
What is the difference between the mro & isc?
Explain paging concept in memory?
What are the different types of table spaces?
What is defragmentation and what is its advantage?
What is the difference between inrec and outrec?
What is the difference between hidam and hdam databases?
What do you mean by monitor block?
If an array is multi-dimensional dynamic array how do you deal with it & provide me some examples?
What is Framework & How it work?