Normal Topic Q&A conversion external field references (Read 1053 times)
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Q&A conversion external field references
Mar 15th, 2005 at 5:02pm
Print Post Print Post  
Hi all!

A am working on cleaning up some Q&A databases for import into Sesame. I have tried importing them to see what still needs to be done but I still have some questions.

I remember reading that Sesame doess not refer to fields with using the #fieldnumber format. When I translate my Q&A database into a sesame it tranlates the field numbers for fields in the current database I am translating into the field names. What it does not translate is the external field referencess in Xlookup statements that look like this X#30.

My question is do I need to change these references by field number to external field by hand or should it translate these when I translate the Q&A database into a Sesame database and I am doing something wrong that it is not translating it.

Thanks for your help!

Frederick
  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged
 
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Re: Q&A conversion external field references
Reply #1 - Mar 15th, 2005 at 9:59pm
Print Post Print Post  
I have done some more looking and found that in my programming the names of the external fields in the xlookup statements are being translated by Sesame , however what is not translating is the names of the external fields in the @xlr statements. Here is a programming statement from Q&A for one field . . .

>#2:                                                                               #209 = ;   xlookup ("tair",#1,"prog name","language",#22);    if @add then xlookup ("tair",#1,"prog name","speaker",#21);    if #2 =  then @msg("OOPS! YOU MUST HAVE A VALUE HERE");   if #2 =  then goto #2;     #310 = (#210  + @str(#2));   if #4= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="monday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","mon"));   if #5= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="monday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","mon"));   if #4= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="tuesday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","tue"));   if #5= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="tuesday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","tue"));   if #4= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="wednesday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","wed"));   if #5= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="wednesday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","wed"));    if #4= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="thursday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","thu"));   if #5= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="thursday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","thu"));    if #4= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="friday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","fri"));   if #5= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="friday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","fri"));   if #4= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="saturday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","sat"));   if #5= and @ad and  @dw$(@xlr(@fn,#310,"x#310","x#4"))="saturday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","sat"));   if #4= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="sunday"  then #4=@td(@xlr(@fn,#310,"x#310","x#4"))+  @tn(@xlu("tair",#1,"prog name","sun"));   if #5= and @ad and @dw$(@xlr(@fn,#310,"x#310","x#4"))="sunday"  then #5=@td(@xlr(@fn,#310,"x#310","x#5"))+  @tn(@xlu("tair",#1,"prog name","sun"));    if #20=  and @ad then #20=@td(@xlr(@fn,#310,"x#310","x#20"))+7;  if #30=  and @ad then #30=@td(@xlr(@fn,#310,"x#310","x#30"))+7;   if @ad and @tn(@xlr(@fn,#310,"x#310","x#81")) <  @tn(@xlr(@fn,#310,"x#310","x#82"))  then #81=@tn(@xlr(@fn,#310,"x#310","x#81"))+1;   if @ad and @tn(@xlr(@fn,#310,"x#310","x#81")) <  @tn(@xlr(@fn,#310,"x#310","x#82"))  then #82=@tn(@xlr(@fn,#310,"x#310","x#82"));   if @ad and not @tn(@xlr(@fn,#310,"x#310","x#81")) <  @tn(@xlr(@fn,#310,"x#310","x#82"))  then #81=1;   if @ad and not @tn(@xlr(@fn,#310,"x#310","x#81")) <  @tn(@xlr(@fn,#310,"x#310","x#82"))  then #82=1;   if #3=  and @ad then #3=@td(@xlr(@fn,#310,"x#310","x#3"));100 = @dow$(#4);999 =(@int(((@lu(@dw$(#4),1))+(#4-(@td(@str(@yr(#4))+"/01/01"))))/7))+1;f #999 ="01" and (@yr(#4 + @tn((@lu(@dw$(#4),1))))) <> @yr(#4) then99= "52";f #999 ="53" and (@yr(#4 + @tn((@lu(@dw$(#4),1))))) <> @yr(#4) then99= "1";f #20 =  then #101 =  else #101 = @dow$(#20); #20 =  then #30 = "";f #30 = "" then #102 = "" else #102 = @dow$(#30);

===================================
and the translation from Sesame.
===================================


** PROGRAMMING SECTION: [PROG NO] [On Element Exit] **
WKFLD = BLANKFLD;

     xlookup ("tair",PROG NAME,"prog name","language",LANGUAGE);

     if @add then xlookup ("tair",PROG NAME,"prog name","speaker",SPEAKER(S));

    if PROG NO = BLANKFLD then @msg("OOPS! YOU MUST HAVE A VALUE HERE");

     if PROG NO = BLANKFLD then goto PROG NO;

     REPEAT KEY = (SHORT FORM  + @str(PROG NO));

    if AIR DATE-1=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="monday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","mon"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="monday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","mon"));

    if AIR DATE-1=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="tuesday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","tue"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="tuesday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","tue"));

    if AIR DATE-1=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="wednesday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","wed"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="wednesday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","wed"));

    if AIR DATE-1=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="thursday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","thu"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="thursday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","thu"));

    if AIR DATE-1=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="friday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","fri"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="friday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","fri"));

    if AIR DATE-1=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="saturday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","sat"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and

    @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="saturday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","sat"));

    if AIR DATE-1=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="sunday"

    then AIR DATE-1=@td(@xlr(@fn,REPEAT KEY,"x#310","x#4"))+

    @tn(@xlu("tair",PROG NAME,"prog name","sun"));

    if BROADCASTER AIR DATE=BLANKFLD and @ad and @dw$(@xlr(@fn,REPEAT KEY,"x#310","x#4"))="sunday"

    then BROADCASTER AIR DATE=@td(@xlr(@fn,REPEAT KEY,"x#310","x#5"))+

    @tn(@xlu("tair",PROG NAME,"prog name","sun"));

    if AIR DATE-2= BLANKFLD and @ad then AIR DATE-2=@td(@xlr(@fn,REPEAT KEY,"x#310","x#20"))+7;

    if AIR DATE-3= BLANKFLD and @ad then AIR DATE-3=@td(@xlr(@fn,REPEAT KEY,"x#310","x#30"))+7;

    if @ad and @tn(@xlr(@fn,REPEAT KEY,"x#310","x#81")) <

    @tn(@xlr(@fn,REPEAT KEY,"x#310","x#82"))

    then Part=@tn(@xlr(@fn,REPEAT KEY,"x#310","x#81"))+1;

    if @ad and @tn(@xlr(@fn,REPEAT KEY,"x#310","x#81")) <

    @tn(@xlr(@fn,REPEAT KEY,"x#310","x#82"))

    then of=@tn(@xlr(@fn,REPEAT KEY,"x#310","x#82"));

    if @ad and not @tn(@xlr(@fn,REPEAT KEY,"x#310","x#81")) <

    @tn(@xlr(@fn,REPEAT KEY,"x#310","x#82"))

    then Part=1;

    if @ad and not @tn(@xlr(@fn,REPEAT KEY,"x#310","x#81")) <

    @tn(@xlr(@fn,REPEAT KEY,"x#310","x#82"))

    then of=1;

    if DATE REC'D= BLANKFLD and @ad then DATE REC'D=@td(@xlr(@fn,REPEAT KEY,"x#310","x#3"));

AD1-DAY = @dow$(AIR DATE-1);

WEEK NUMBER =(@int(((@lu(@dw$(AIR DATE-1),1))+(AIR DATE-1-(@td(@str(@yr(AIR DATE-1))+"/01/01"))))/7))+1;

if WEEK NUMBER ="01" and (@yr(AIR DATE-1 + @tn((@lu(@dw$(AIR DATE-1),1))))) <> @yr(AIR DATE-1) then

WEEK NUMBER= "52";

if WEEK NUMBER ="53" and (@yr(AIR DATE-1 + @tn((@lu(@dw$(AIR DATE-1),1))))) <> @yr(AIR DATE-1) then

WEEK NUMBER= "1";

if AIR DATE-2 = BLANKFLD then AD2-DAY = BLANKFLD else AD2-DAY = @dow$(AIR DATE-2);

if AIR DATE-2 = BLANKFLD then AIR DATE-3 = "";

if AIR DATE-3 = "" then AD3-DAY = "" else AD3-DAY = @dow$(AIR DATE-3);
=================================
As you can see the names of  external fields in the  xlookup statements get translated but they do not in @xlr statements.

Is this a bug?  Or does Sesame not do the translation for  the external fields for the @xlr statements?

Thanks again for your help!

Frederick

  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Q&A conversion external field references
Reply #2 - Mar 15th, 2005 at 10:21pm
Print Post Print Post  
It is not a bug. Sesame will not attempt to change anything that it finds inside double quotes. Anything in double quotes is considered user data - and thus "hands-off". Additionally, because the field number reference is contained in a .dtf file (the external database) that isn't being actively translated, there is no way for Sesame to find and transform the field number into a field name.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged