Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Server_swap: How to quickly change every INCLUDE statement?

Hi,

we are going to have a server swap here in two weeks which means we are going to have to adapt quite a lot:

- In every single qvw we have, there are a number of INCLUDE statements, all on one sheet of the script afaIk, which point to a place on the server - since the server does not know the drive_letters, we have written out the URL in every one of those

=> so we'll have to open every single qvw and replace that.

Okay, that is not too much work for one - just step through it with find_replace - but every single one, and some of them are huge, so they take a bit to open ... isn't there a faster way we could do that?

Thanks a lot!

Best regards,

DataNibbler

16 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

These path manipulations are an entirely manual affair, as you will be the only one knowing where files are to be found. The initially generated LOAD statements will still use absolute or relative paths, but you may have to copy/paste a different path in the FROM section that uses path variables.

For the initial INCLUDE, define it manually once, and then copy the line into your other document scripts.

Peter

Anonymous
Not applicable

You can check how relative paths work by CD 'ing from the dos prompt and seeing where you end up

E:\QV.DEV\QV.Bill.Markham\Config>CD E:\QV.DEV\QV.Bill.Markham\QVD.Generate

E:\QV.DEV\QV.Bill.Markham\QVD.Generate>CD ..\Config\

E:\QV.DEV\QV.Bill.Markham\Config>

datanibbler
Champion
Champion
Author

Hi Bill,

in the command-line, >> cd ..\.. << will take me up two hierarchy-levels. I will try - but that is not my issue: I know that the automatically generated LOAD_statements are always absolute, I can manipulate them - but then I get an error_message and from that I can see that QlikView looked for a directory labeled ".." INSIDE the directory where the qvw is located.

I attach a screenshot of the message so it is quite clear ... ah. It seems to work now. Let's see ...I have to try out if I can cd into a directory on the "main server" at all.

datanibbler
Champion
Champion
Author

Nope,

it seems I cannot do it. Let's see if I can explain:

- Say, the qvw is in a directory with the UNC \\QlikViewServer\production\

- So I would have to go up two hierarchy-levels, then I should be on the main_server, yes?

<=> well, that doesn't work - if I do, what's left is just the > \\ < - no server_name or anything at all

=> So I would have to specify the full UNC of the main_server to go down again from there, which would turn the whole thing into some stupid kind of WIFI_cable ...

So I'm afraid I'll just have to open every single qvw when that day comes around - or maybe I could put those INCLUDEs in an IF_THEN clause and make their execution dependent on the current date - could I do that?

Then I could already write all the INCLUDEs like they have to be then and the actual swap will be automatic, I will just have to remove the old statements and the loops in the weeks after that.

Best regards,

DataNibbler

P.S.: Hmm ... that seems to work. So I can open up every qvw over the course of the next week or two and just implement that IF_THEN_clause in every one.

Anonymous
Not applicable

  • As Peter said "create an initial settings.ini file that contains a few fully qualified paths that you really need" and put that in this folder you just created

  • Hard code in your script the relative path to this folder so you can load the settings.ini file

  • As I said earlier "In that single file that defines your other folder locations these folder locations held in it can be in whatever format works for you - relative, fixed, unc, "url" or whatever .............."
datanibbler
Champion
Champion
Author

Hi Bill,

you're right - but we're turning in circles.

Like I said, relative paths don't work for me because from that "QlikView_server" which is really just one partition of the main_server, I cannot go up three or four hierarchy-levels and end up in some directory on the main_server - doesn't work. End of story.

I am just asking for confirmation of what I know about the servername-to-be, then I can build up an IF_THEN clause like I said. So the actual swap will be automatic and I will just have to do some cleanup in the weeks after that date.

Best regards,

DataNibbler

Anonymous
Not applicable

Fell free to do it the hard way.