03-26-2017 08:47 PM
Can someone tell me how do I get the output as '26MAR2017-0001' upto with an increment upto 1000?
I was able to figure out how to get the output as '26MAR17-0001'
DATA want; DO _n_=1 TO 1000; x = "&SYSDATE"||'-'||PUT(_n_, z4.); OUTPUT; END; RUN;
03-26-2017 08:53 PM
Your code looks fine, try using a variable other than _n_, which is an automatic variable and trying to loop with it may confuse things.
I would probably also use CATX.
Need further help from the community? Please ask a new question.