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 you name a few software running under the mainframe?
what optimum values can we find for freespace, ci etc?
Can we give +2 instead of +1 while creating a new gdg file?
Explain the use of the where?
Hello, I have 3 years of exp as a mainframes tester in a leading IT company, now am looking to change my company. Could you please let me know, what are the interview questions/topics i should prepare. Your suggestions are truly valuable for me :) Thanks !!
Are scope terminators compulsory? If they are, when?
When you are working with the project.. once your coding is over what will u do? where u r maintaining your CR(change request) what is the format what are the documents u need to prepare while testing?
Can you explain function of dbctl?
How do you create a like table?
How can a like table be created?
What is the difference between inrec and outrec?
how could you write a program in a structured format?
what is the meaning of ssrange and nossrange?
Can any one tell me that how we go for the compare,unit testing after changing requirement as per client request. this is very helpful for me when u give suitable (coading) exmple.
What is Framework & How it work?