1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-15 16:14:36 +00:00

fix: linting

This commit is contained in:
2021-04-03 21:30:51 +02:00
parent 096bf4fa11
commit 0a38056c69
88 changed files with 1762 additions and 1468 deletions

View File

@@ -37,8 +37,8 @@
%&mD.put _local_;
/**
* check tree exists
*/
* check tree exists
*/
data _null_;
length type uri $256;
@@ -54,8 +54,8 @@ run;
)
/**
* Check object exists
*/
* Check object exists
*/
data _null_;
length type docuri tsuri tsid $256 ;
rc1=metadata_pathobj("","&tree/&name","Note",type,docuri);
@@ -73,14 +73,14 @@ run;
)
/**
* Now we can extract the textstore
*/
* Now we can extract the textstore
*/
filename __getdoc temp lrecl=10000000;
proc metadata
in="<GetMetadata><Reposid>$METAREPOSITORY</Reposid>
<Metadata><TextStore Id='&tsid'/></Metadata>
<Ns>SAS</Ns><Flags>1</Flags><Options/></GetMetadata>"
out=__getdoc ;
in="<GetMetadata><Reposid>$METAREPOSITORY</Reposid>
<Metadata><TextStore Id='&tsid'/></Metadata>
<Ns>SAS</Ns><Flags>1</Flags><Options/></GetMetadata>"
out=__getdoc ;
run;
/* find the beginning of the text */
@@ -98,47 +98,47 @@ data _null_;
/* read the content, byte by byte, resolving escaped chars */
filename __outdoc "&outref" lrecl=100000;
data _null_;
length filein 8 fileid 8;
filein = fopen("__getdoc","I",1,"B");
fileid = fopen("__outdoc","O",1,"B");
rec = "20"x;
length entity $6;
do while(fread(filein)=0);
x+1;
if x>&start then do;
rc = fget(filein,rec,1);
if rec='"' then leave;
else if rec="&" then do;
entity=rec;
do until (rec=";");
if fread(filein) ne 0 then goto getout;
rc = fget(filein,rec,1);
entity=cats(entity,rec);
length filein 8 fileid 8;
filein = fopen("__getdoc","I",1,"B");
fileid = fopen("__outdoc","O",1,"B");
rec = "20"x;
length entity $6;
do while(fread(filein)=0);
x+1;
if x>&start then do;
rc = fget(filein,rec,1);
if rec='"' then leave;
else if rec="&" then do;
entity=rec;
do until (rec=";");
if fread(filein) ne 0 then goto getout;
rc = fget(filein,rec,1);
entity=cats(entity,rec);
end;
select (entity);
when ('&amp;' ) rec='&' ;
when ('&lt;' ) rec='<' ;
when ('&gt;' ) rec='>' ;
when ('&apos;') rec="'" ;
when ('&quot;') rec='"' ;
when ('&#x0a;') rec='0A'x;
when ('&#x0d;') rec='0D'x;
when ('&#36;' ) rec='$' ;
when ('&#x09;') rec='09'x;
otherwise putlog "WARNING: missing value for " entity=;
end;
rc =fput(fileid, substr(rec,1,1));
rc =fwrite(fileid);
end;
select (entity);
when ('&amp;' ) rec='&' ;
when ('&lt;' ) rec='<' ;
when ('&gt;' ) rec='>' ;
when ('&apos;') rec="'" ;
when ('&quot;') rec='"' ;
when ('&#x0a;') rec='0A'x;
when ('&#x0d;') rec='0D'x;
when ('&#36;' ) rec='$' ;
when ('&#x09;') rec='09'x;
otherwise putlog "WARNING: missing value for " entity=;
else do;
rc =fput(fileid,rec);
rc =fwrite(fileid);
end;
rc =fput(fileid, substr(rec,1,1));
rc =fwrite(fileid);
end;
else do;
rc =fput(fileid,rec);
rc =fwrite(fileid);
end;
end;
end;
getout:
rc=fclose(filein);
rc=fclose(fileid);
end;
getout:
rc=fclose(filein);
rc=fclose(fileid);
run;
filename __getdoc clear;
filename __outdoc clear;