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


Please Help Members By Posting Answers For Below Questions

Can you name a few software running under the mainframe?

539


what optimum values can we find for freespace, ci etc?

602


Can we give +2 instead of +1 while creating a new gdg file?

539


Explain the use of the where?

600


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 !!

1494






Are scope terminators compulsory? If they are, when?

495


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?

1568


Can you explain function of dbctl?

666


How do you create a like table?

534


How can a like table be created?

546


What is the difference between inrec and outrec?

643


how could you write a program in a structured format?

584


what is the meaning of ssrange and nossrange?

602


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.

1712


What is Framework & How it work?

1648