Focal Point
[CLOSED] (FOC36318) MAP NAME: fochold ALREADY USED. USE "APP MAP fochold" TO UNMAP

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9257008895

February 16, 2011, 06:12 AM
MKS
[CLOSED] (FOC36318) MAP NAME: fochold ALREADY USED. USE "APP MAP fochold" TO UNMAP
Hi,

I am getting this error

(FOC36318) MAP NAME: fochold ALREADY USED. USE "APP MAP fochold" TO UNMAP

changing the hold name would resolve the issue. But just would like to check if there is really any way to UNMAP the maping as said in the error message.

This message has been edited. Last edited by: Kerry,


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
February 16, 2011, 12:32 PM
<JG>
Do you have an APP MAP statement in your code?

If you do not then you should not be getting this error
February 16, 2011, 03:45 PM
Waz
Can you post the code that is causing the error?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 17, 2011, 02:43 AM
MKS
-DEFAULT &EXECRPTHLDLOC = '/home/apps/';
 -REPEAT ENDLOOP 3 TIMES
-SET &SUP_LVL = &START_LVL;
-SET &SUP_LWLVL = &SUP_LVL - 1;
-SET &HLDFILE = &EXECRPTHLDLOC||'lvl'||&SUP_LVL.EVAL||'car'||'/';
-*
APP ENABLE
APP MAP FOCHOLD &HLDFILE
APP HOLD FOCHOLD
-RUN
-*
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS CAR_OPT
END
-RUN
-*
-RUN
-ENDLOOP
-EXIT 


The code is actually little big so putting the idea here.
I have 3 different directory in /home/apps/ as lvl1car, lvl2car and lvl3car. I was expecting to save the output of the table file command to these three directories using loop. I actual case I have different outputs going to different directories.

_MKS


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
February 17, 2011, 10:42 AM
j.gross
In the code you posted, &SUP_LVL remains constant through the three iterations of the loop.
February 17, 2011, 03:41 PM
Waz
It may be easier if you used -REPEAT with FOR FROM TO.

-REPEAT ENDLOOP FOR &SUP_LVL FROM 1 TO 3 ;
.
.
.
-ENDLOOP



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 21, 2011, 06:46 AM
MKS
Sorry I missed incrementing ...
  -DEFAULT &EXECRPTHLDLOC = '/home/apps/';
 -REPEAT ENDLOOP 3 TIMES
-SET &SUP_LVL = &START_LVL;
-SET &SUP_LWLVL = &SUP_LVL - 1;
-SET &HLDFILE = &EXECRPTHLDLOC||'lvl'||&SUP_LVL.EVAL||'car'||'/';
-SET &START_LVL = &START_LVL - 1;
-*
APP ENABLE
APP MAP FOCHOLD &HLDFILE
APP HOLD FOCHOLD
-RUN
-*
TABLE FILE CAR
PRINT *
ON TABLE HOLD AS CAR_OPT
END
-RUN
-*
-RUN
-ENDLOOP
-EXIT


I am getting same error even if I use FOR loop.


WebFocus 5.2.5
HP-UX(UNIX)
EXCEL, HTML, PDF and OLAP
February 21, 2011, 08:04 AM
<FreSte>
If I understand the question correctly, you want to HOLD 3 different files in 3 different directories.


-REPEAT :LB_LOOP1 FOR &I FROM 1 TO 3;
-* --- Name of directory "under" APPROOT
APP HOLD LVL&I.EVALCAR
TABLE FILE CAR
  SUM 
    DEALER_COST
  BY COUNTRY
  ON TABLE HOLD AS HLDLVL&I.EVAL FORMAT ALPHA
END
-:LB_LOOP1

February 21, 2011, 09:26 AM
j.gross
Note:
".EVAL" is generally superfluous in a Focus command (any line that does not start with "-"), since the script (amper) variable is always replaced by the character representation of its value before the line is placed in FocStack.

- - -

.EVAL will make a difference in a Focus command if the value of the referenced script variable is the name of another script variable. For example:
-SET &ECHO=ON;
-SET &ALPHA = '&' | BETA;
-SET &BETA  = CAR;
? FDT &ALPHA
-RUN
? FDT &ALPHA.EVAL

(Try it)


- Jack Gross
WF through 8.1.05
February 21, 2011, 03:56 PM
Waz
Assuming each app directory exists, change the code to this.

APP ENABLE
APP MAP FOCHOLD&SUP_LVL &HLDFILE
APP HOLD FOCHOLD&SUP_LVL


or

APP ENABLE
APP MAP FOCHOLD
APP MAP FOCHOLD &HLDFILE
APP HOLD FOCHOLDL



Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!