Read variable out of file.

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

acascianelli

Posts: 4
Joined: Fri May 17, 2013 1:17 pm

Post by acascianelli » Fri Jun 13, 2014 1:54 pm
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.

Example:

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].

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Jun 17, 2014 8:31 am
Anthony,

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...
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1