I ran the following program and got the error as below. Appreciate if someone of you guide me to get the desired output.
%macro test;
%let sysparm=D20181207:00:00:00*N*N ;
%let glb_runcode = %substr(&sysparm,2,8);
%put glb_runcode = &glb_runcode ;
%let glb_runcode_date=%sysfunc(inputn(&glb_runcode,date9.));
%put glb_runcode_date = &glb_runcode_date ;
%mend;
%test;
4 %macro test;
25 %let sysparm=D20181207:00:00:00*N*N ;
26 %let glb_runcode = %substr(&sysparm,2,8);
27 %put glb_runcode = &glb_runcode ;
28 %let glb_runcode_date=%sysfunc(inputn(&glb_runcode,date9.));
29 %put glb_runcode_date = &glb_runcode_date ;
30 %mend;
31
32 %test;
glb_runcode = 20181207
WARNING: Argument 1 to function INPUTN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.
NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set
to a missing value.
Desired Output:
glb_runcode_date = 7dec2018
... View more