Focal Point
Accessing HOLD Files in Called Fex

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

April 05, 2007, 11:25 AM
smiths
Accessing HOLD Files in Called Fex
I have a fex (fex1) that generates several HOLD files (say H1 and H2). fex1 has a drilldown to another fex, fex2. How can I access the HOLD files H1 and H2 from fex2? I don't want to pass the data from the HOLD files in fex1 as parameters to fex2, nor do I want to regenerate the HOLD files in fex2. There must be an easy way to access the HOLD files generated in fex1 from fex2, but I don't know (or don't remember) how to do this.

Thanks!
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
April 05, 2007, 11:33 AM
Tom Flynn
Sean,

Use APP HOLD FOLDERNAME in fex1.
FILEDEF H1 DISK FOLDERNAME\H1.ftm in fex2


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 05, 2007, 11:38 AM
smiths
Thanks for the quick response Tom!

I will have many users running this code simultaneously, and their hold output will always be different. Is there a special FOLDERNAME (directory) that I could use to ensure no conflicts?

Thanks again.
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
April 05, 2007, 11:45 AM
Tom Flynn
Sean,

I've done this many times, BUT, with SECURITY ON...

fex1:
APP HOLD FOLDERNAME
-RUN
-SET &USERX = GETUSER('A8');
-SET &FILE = &USERX || '1';

ON TABLE HOLD AS &FILE
END

fex2:
APP HOLD FOLDERNAME
-SET &USERX = GETUSER('A8');
-SET &FILEX = &USERX || '1.ftm';
-SET &DDNAME = &USERX || '1';


FILEDEF &DDNAME DISK FOLDERNAME\&FILEX
-RUN


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 05, 2007, 11:53 AM
smiths
Ah OK, you create a separate directory per user.

When we execute an ON TABLE HOLD command, the HOLD file is magically stored uniquely per user somewhere (can anybody tell me where that is?), and I was hoping there is some way to mirror this same directory with the APP HOLD command that you have suggested.

Thanks,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
April 05, 2007, 11:57 AM
Tom Flynn
Sean,

We always create a folder for user data repository, i.e., DATAHOLD

then:
fex1:
APP HOLD DATAHOLD
-RUN
-SET &USERX = GETUSER('A8');
-SET &FILE = &USERX || '1';

ON TABLE HOLD AS &FILE
END

fex2:
APP HOLD DATAHOLD
-SET &USERX = GETUSER('A8');
-SET &FILEX = &USERX || '1.ftm';
-SET &DDNAME = &USERX || '1';


FILEDEF &DDNAME DISK DATAHOLD\&FILEX
-RUN

Not a separate directory, a UNIQUE HOLD file. At the end of fex2, DELETE/REMOVE the file

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 05, 2007, 12:02 PM
smiths
Tom,

Sorry, yes, that's what I meant to say!

Thanks again for all your assistance!

Can anyone help explain the default directory where the HOLD files are stored when APP HOLD is not used? And if/how I can simulate that directory with APP HOLD?

Thanks,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
April 05, 2007, 12:07 PM
Tom Flynn
Sean,

They are stored on VENUS, then erased at the end of execution, usually looks like, with ? PATH:

APPHOLD = /u01/iadmin/ibi/srv71/wfs/edatemp/ts000003:

It is a temp directory...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
April 05, 2007, 12:11 PM
smiths
Tom,

OK, so I guess WebFOCUS handles this in the edatemp directory (based on the user's process id I guess), and we need to handle it in some way as you have suggested, such as creating a filename based on the user's userid.

Thanks!
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode