Ok i am literally stuck and dont understand this:
I am running a code with Perl regular expression:
Data want;
set have;
o=prxparse('/(number:) \s*\d+/i');
start=1;stop=length(nr);
call prxnext(o,start,stop,nr,p,l);
NR=compress(substr(nr,p,l),,'kd');
drop o start stop p l;
run;
The contents of nr looks like this:
NR NUMBER: 123456
This is returning the following error:
750 Data Want;
751 set Have;
752 o=prxparse('/(number:) \s*\d+/i');
753 start=1;stop=length(nr); l=1;
754 call prxnext(o,start,stop,nr,p,l);
-------
731
WARNING 731-185: Argument #5 is a character variable, while a numeric variable must be passed to
the PRXNEXT subroutine call in order for the variable to be updated.
754! call prxnext(o,start,stop,nr,p,l);
-------
731
WARNING 731-185: Argument #6 is a character variable, while a numeric variable must be passed to
the PRXNEXT subroutine call in order for the variable to be updated.
755 *NR=compress(substr(nr,p,l),,'kd');
756 NR=substr(nr,p,l);
757 drop o start stop p l;
758 run;
NOTE: Numeric values have been converted to character values at the places given by:
(Line):(Column).
753:30
NOTE: Character values have been converted to numeric values at the places given by:
(Line):(Column).
754:32 754:34 756:15 756:17
NOTE: Invalid second argument to function SUBSTR at line 756 column 4.
Could anyone please advice me on this
Thanks
... View more