One thing I would suggest is to get away from using "input" to run a program. Generally this is used to load a file's contents into a table as data. >From your original post of the output you were getting, it looks like that's what it was trying to do. Did you try using 'RUN' rather than input?
Karen > Can some one explain why when I trace rhe below code everything works > correctly - but when I input I get the following error - > thanks

