Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-07-2004, 10:51 AM
chaoconnor chaoconnor is online now
Registered User
 
Join Date: 02-25-2004
Posts: 8
Unrecoverable Parse Error

Good morning!

I'm trying to parse a text file that contains a list of database object names. The process works fine till it reaches a write to text file step and then I get the following errror:

Building project step 'Create RawAll.sql File'...
Step default property 'Filename' = 'C:\Temp\RAW_SQL.txt'
Error expanding macros in property Text: <Error parsing macros: Unrecoverable Parse Error at position 919 - expecting percent_sign>
Step 'Create RawAll.sql File' failed
Build ended.


What's so perplexing is the MARCO that fails is different each time. For instance, one time I may have successfully parsed 100 file names, the next I may only get 20, etc. The list of names does not change, it's been the same since I started.

Any ideas? Thank you!
Reply With Quote
  #2  
Old 04-07-2004, 11:16 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Whatever is in the Text field of the failing step contains a lone percent sign (%) character. Percent signs (i.e. %MACROX%) in a step field are interpreted by VBP as a macro name to be expanded as its value; to insert an actual percent char, double percents are used (%%).

It's not clear exactly how this field is being initialized in your case, but if you're reading the contents of a file which may contain such characters, you can use the vbld_GetFileContents system function (added in version 5.2) to double up any special characters so they will be interpreted as literals by VBP.
Reply With Quote
  #3  
Old 04-07-2004, 11:19 AM
chaoconnor chaoconnor is online now
Registered User
 
Join Date: 02-25-2004
Posts: 8
That was my first thought as well, but there are no % signs in the text file it's reading from, nor does that explain why it works for a file name one time, but then may fail on it the next.

Does vbld_GetFileContents replace vbld_AddDelimValue "FILE_LIST", f.ReadLine() I've been using?

Thank you!

Last edited by chaoconnor; 04-07-2004 at 11:21 AM.
Reply With Quote
  #4  
Old 04-07-2004, 11:44 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Not sure then. Break it down to a reproducible case that we can build, attach the .bld file here, and we'll take a look at it. And also post the info from Help | About | Install Info. Thanks.
Reply With Quote
  #5  
Old 04-07-2004, 11:56 AM
chaoconnor chaoconnor is online now
Registered User
 
Join Date: 02-25-2004
Posts: 8
will do:
Help Info -
Visual Build Professional 5.3
Registered to: Aramark (1-computer license)
Windows Version: 5.1.2600.1.0
Install path: C:\Program Files\VisBuildPro
cmax20u.dll version 2.1.0.21
SftTree_IX86_U_45.dll version 4.5a
unins000.exe version 51.13.0.0
VisBuildBld.dll version 5.3.0.0
VisBuildCmd.exe version 5.3.0.1
VisBuildCore.dll version 5.3.0.1
VisBuildDotNET.dll version 5.3.0.0
VisBuildExt.dll version 5.3.0.1
VisBuildLog.dll version 5.3.0.1
VisBuildMisc.dll version 5.3.0.1
VisBuildMS.dll version 5.3.0.1
VisBuildNet.dll version 5.3.0.1
VisBuildPro.exe version 5.3.0.1
VisBuildSvr.dll version 5.3.0.1

Thanks for your help!
Attached Files
File Type: bld newbuild_all_sql.bld (35.6 KB, 1387 views)
Reply With Quote
  #6  
Old 04-07-2004, 12:16 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The project won't build here. The 'Create RawAll.sql File' step fails because SQL_FILES is an undefined macro; it's also referencing a file nameddbnewarcs1.fnGetDedn_Rate.UDF which I don't have.

But try changing

[vbld_FSO.OpenTextFile("%SQL_FILES%\%NEXT_FILE%").R eadAll]

in that step to

[vbld_GetFileContents("%SQL_FILES%\%NEXT_FILE%")]
Reply With Quote
  #7  
Old 04-07-2004, 12:26 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
And if the step still fails, when it fails, open the step properties dialog, separately select each macro referenced in the step (i.e., %DBLOGIN%, etc.) move the mouse away from the edit field and back again; if an error is displayed in the tooltip, that macro value is likely the problem. Click the Insert Macro button, locate the macro in question to see its unexpanded macro value, and the problem should be apparent.
Reply With Quote
  #8  
Old 04-07-2004, 01:54 PM
chaoconnor chaoconnor is online now
Registered User
 
Join Date: 02-25-2004
Posts: 8
The [vbld_GetFileContents("%SQL_FILES%\%NEXT_FILE%")] seems to have done the trick. Thank you very much!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:29 PM.


Copyright © 1999-2023 Kinook Software, Inc.