JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

assign return value to macro functions

发布时间 2023-08-30 09:02:01作者: helloyuen

/* To check if a variable {vnam} exists on a dataset {dsnam} /
/
Return a non-zero number if variable exists */

%macro var_exists(dsnam, vnam);
%local dsid vnum;
%let vnum = 0;
%let dsid = %sysfunc(open(&dsnam));
%if &dsid ne 0 %then %do;
	%let vnum = %sysfunc(varnum(&dsid, &vnam));
	%let dsid = %sysfunc(close(&dsid));
%end;
&vnum
%mend var_exists;
    本栏目推荐文章
  • Oracle 19c 升级错误【verify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table】
  • 【问题记录】【Fastjson】Fastjson 反序列化失败,syntax error, position at 0, name value
  • Redis - (error) WRONGTYPE Operation against a key holding the wrong kind of value
  • element el-select value-key 的bug
  • koa2 使用koa-body引入报错 koaBody is not a function
  • 关于函数式接口中常用的Supplier、Consumer、predicate、Function的总结以及其使用场景
  • User Output Value
  • JavaScirpt | String Function (三)
  • seata-server-1.8.0 | Could not resolve placeholder 'console.user.username' in value "${console.user.username}"  | "${seata.security.secretKey}"
  • Springboot 多环境配置、${key:default_value}的作用与使用
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们