@sfinch wrote:
Your command
%LET fpath = /wrds/taq.&yyyy/taq%SUBSTR(&yyyy,3,2)d/sasdata;
works perfectly: thank you! It certainly is more concise as well.
Looking back at my code, why does SAS treat &yyyy differently than &yy?
While PUT(&yy,Z2.) was necessary to format &yy correctly, &yyyy required no additional intervention. This asymmetry is puzzling to me. Is an explanation possible?
Try it with YYYY=0000 and it will do the same thing. Since your values for YYYY were likely to be in 19xx or 20xx or such range then the first significant digit appears in the first of 4 digits.
Or try YY = 0015, you'll get 15 in the output for the &yyyy for the same reason: conversion using best. format.
... View more