22 lines
612 B
Plaintext
22 lines
612 B
Plaintext
/* PL/I ***************************************************************
|
|
* 17.08.2013 Walter Pachl
|
|
**********************************************************************/
|
|
*process source attributes xref;
|
|
sd: Proc Options(main);
|
|
Dcl a(4) Char(20) Var Init('John','Bob','Mary','Serena');
|
|
Dcl b(4) Char(20) Var Init('Jim','Mary','John','Bob');
|
|
Call match(a,b);
|
|
Call match(b,a);
|
|
match: Proc(x,y);
|
|
Dcl (x(*),y(*)) Char(*) Var;
|
|
Dcl (i,j) Bin Fixed(31);
|
|
Do i=1 To hbound(x);
|
|
Do j=1 To hbound(y);
|
|
If x(i)=y(j) Then Leave;
|
|
End;
|
|
If j>hbound(y) Then
|
|
Put Edit(x(i))(Skip,a);
|
|
End;
|
|
End;
|
|
End;
|