Using a comma as a delimiter with the seperate command
Moderators: JRL, Dorian (MJT support)
Using a comma as a delimiter with the seperate command
Am trying to use seperate with a comma delimiter and it's not working properly, the code is shown below (I'm using 7.3.11.4). If I change the delimiter to a semi-colon it works every time but the input is going to come from a 2d scan that will have data seperated by commas. Tried using a percent around the middle comma in the seperate command and I got the same results.
When run, I key in the following D123456,P98765,Q50. Instead of seeing the data in the message modal and message box I see the variable names. Anyone see what I've missed? Thanks
Input>files,Please scan now ...
Separate>files,,,names
MessageModal>Num Files: %names_count%
Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF%
Label>end
When run, I key in the following D123456,P98765,Q50. Instead of seeing the data in the message modal and message box I see the variable names. Anyone see what I've missed? Thanks
Input>files,Please scan now ...
Separate>files,,,names
MessageModal>Num Files: %names_count%
Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF%
Label>end
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I have duplicated your problem also.
I have used period, semi-colon, tilde, pipe characters, hard coded and as a variable, all work OK.
But using a comma does not work.
Looks like you may need to do a global replace first changing the comma to another acceptable character.
I have used period, semi-colon, tilde, pipe characters, hard coded and as a variable, all work OK.
But using a comma does not work.
Code: Select all
Let>files=D123456,P98765,Q50
Let>Break=,
Separate>files,%Break%,names
MessageModal>Num Files: %names_count%
Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF%
Label>end
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
For some reason it doesn't like the explicit variable (%), this (based on a post from Support a while ago) does work:
Code: Select all
Let>VAREXPLICIT=0
Let>files=D123456,P98765,Q50
Let>Break=,
Separate>files,Break,names
MessageModal>Num Files: %names_count%
Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF%
Label>end
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Actually it is the % itself causing the problem.
VAREXPLICIT default is 0 and not needed.
VAREXPLICIT default is 0 and not needed.
Code: Select all
Let>files=D123456,P98765,Q50
Let>Break=,
Separate>files,Break,names
MessageModal>Num Files: %names_count%
Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF%
Label>end
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Thanks all, it worked !!Me_again wrote:For some reason it doesn't like the explicit variable (%), this (based on a post from Support a while ago) does work:
Code: Select all
Let>VAREXPLICIT=0 Let>files=D123456,P98765,Q50 Let>Break=, Separate>files,Break,names MessageModal>Num Files: %names_count% Message>%names_1%%CRLF%%names_2%%CRLF%%names_3%%CRLF% Label>end
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: