Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
 Do you have a collection of Interview Questions and interested to share with us!! Please send that collection to along with your userid / name. ThanQ

 Categories  >>  Software  >>  MainFrame  >>  IBM MainFrame  >>  IBM MainFrame AllOther

 COBOL Interview Questions JCL Interview Questions CICS Interview Questions DB2 Interview Questions IMS Interview Questions IDMS Interview Questions Natural Interview Questions ADABAS Interview Questions REXX Interview Questions Assembler Interview Questions CLIST Interview Questions QMF Interview Questions MVS Interview Questions OS390 Interview Questions OS 2 Interview Questions VSAM Interview Questions QSAM Interview Questions Sysplex Interview Questions IBM MainFrame AllOther Interview Questions
Question
`What is the difference between Verify & Index in PL/1?`
Question Submitted By :: Khbnaidu
I also faced this Question!!     Rank Answer Posted By

Re: What is the difference between Verify & Index in PL/1?
# 1
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 ? 8 Yes 12 No
Kanishk Kumar

Re: What is the difference between Verify & Index in PL/1?
# 2
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 ? 20 Yes 1 No
Sneha

  Question Asked @ Answers Other IBM MainFrame AllOther Interview Questions how can u view a vsam file using file-aid IBM 5 Determine the total no of bytes in the following 01 rec1 . 02 a pic x(6). 02 b redefines a. 03 c occurs 6 times pic 9. 02 d occurs 4 times. 03 e pic x(5). 03 f pic 999. a)38. b)44 c)14 d)32 Accenture 3 what is copybooks ? structure of copybook and fillers in copybook ? purpose of using copybook ? Tech-Mahindra 2 Hi All I've got an appointment for my visa interview. I'm confused seeing all the postings I'm currently working in IBM Bangalore, i've got just 3+ years of realtime experience in this field. I've completed my Bachelore of Computer Applications and then Master of Information Systems....and with good percentages... I've seen many posting who's visa got rejected even for 4+years of IT experience VO's asking for 6+ years of exp. I'm afraid...is my exp and background sufficient to get throug the interview and get visa stamped. I'ld be more happy if you can help me in this reg. waiting for reply Smitha 2 whose product is x-peditor ? 1 what are the present versions of all mainframe modules?can any body let me know pls 1 If a=1 or 2 or 3 NEXT SENTENCE ELSE move a to b. a) if A not = 1 or 2 or 3 move A to B b) if not A = 1 and 2 and 3 move A to B c) if A Not = 1 and 2 and 3 move A to B d) if A NOT = 1 or NOT=2 or NOT =3 move A to B Accenture 2 which are the following verb can be used to manipulate the value of an index name A) ADD B) MOVE C) SUBTRACT D) SET Accenture 3 how to change pic of variables declared in copy book inside progrm? 4 how to check the jobs submitted by other users in the spool. Which command has to be used to check the jobs submitted . IBM 3 What is the difference between Verify & Index in PL/1? IBM 2 what is the difference between the jes2 and jes3 2 For more IBM MainFrame AllOther Interview Questions Click Here