Page 1 of 1

Read variable out of file.

Posted: Fri Jun 13, 2014 1:54 pm
by acascianelli
I'm trying to read a single variable out of a file then prefix a filename with that variable., but I'm having trouble getting the variable set correctly.


Filename IDNUM contains the string "12345". I'm trying to rename a file names REPORTFILE, to 12345.REPORTFILE.

Here is what I've tried so far that hasn't worked.

setVariable with an input file: When I use this method, the variable is set correctly but when I rename the file a "?" appears at the end of the variable.

readFlatFile/readFixedWidth: I can get the the function to read the file, but when I try to rename/copy the file I get the following error

An unexpected error occurred. Invalid cursor position: BEFORE_FIRST Original expression: ID[1].

Re: Read variable out of file.

Posted: Tue Jun 17, 2014 8:31 am
by Support_Rick

Post or send us a copy of your XML so I can see what you have. Your first bit of setting a variable should work. Once that variable has been assigned, it's just a matter of renaming the file.

Get me a copy and let's see where we can help you get this going...