What is the difference between Verify & Index in PL/1?
Answers were Sorted based on User's Feedback
VERIFY
Indicates the position in string x of the first character thats not in string y. if all r there it returns 0
example: VERIFY(SAM,SAM)returns 0
VERIFY(ABCD,EREE) returns 1
INDEX
Returns the starting position of the string y within x; returns 0 if y is not there in x
example: index(sam,agt) returns 2
index(sam,dog) returns 0
| Is This Answer Correct ? | 38 Yes | 13 No |
Answer / 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 |
How IBM framework work?
suppose program A is calling program B, at a time A will send 100 records but it has to send 500 records. how it will possible?
Is it possible to move an alphanumeric incentive to a numeric field?
How do you create a like table?
is it possible to write array elements to pf
what is unit testing ? on which basis you will write test case ?
what sorting order does search all have?
.what is required for establishing connectivity between MQ and cics on z/OS? a. MQ-cics gateway b.INITQ as QLocal c. CICS-MQAdapter d.INITPARAM of SIT e. INITQ as QRemote
If an array is multi-dimensional dynamic array how do you deal with it & provide me some examples?
which are the following verb can be used to manipulate the value of an index name A) ADD B) MOVE C) SUBTRACT D) SET
What is mainframe testing?
01 T1. 02 month-day pic x(30) value ?jan,31, feb,28, mar,31, apr,30, may,31, june, 30? 02 new-day redefines month-day occurs 6 times 03 A pic xxx. 03 B pic 99. What are the content of A(3) and B(2) respectively A)mar,31 B) Feb,28 C) 28, Mar E)Mar, 28