I'm using a data step to build up multiple ftp put statements and I need to remove all leading zeros. The person ID is the value with the leading zeros. I'm also trying to figure how to put the quit keyword after the last occurence. I thought last. would work but it isn't coming out correctly.
Below is the data step.
data ids ; id='00123' ; output ; id='04567' ; output ; stop ; run ;
data _null_ ;
set ids end=lastobs ;
if _n_ = 1 then put 'cd incoming' ;
idnum = input(id,best.) ;
put 'put \\your_location\' idnum +(-1) '.jpg' ;
if lastobs then put 'quit' ;