As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Your fex can't find your file. If you are holding a file as TEST02 then it didn't get created. Otherwise you need an APP FI or FILEDEF (or DD in mainframe FOCUS) to point the program to the data.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
TABLE FILE FMR003 SUM 'FMR003.FMR003.PC_PREMIUM_AMOUNT' 'FMR003.FMR003.PC_FEE_AMOUNT' 'FMR003.FMR003.PC_TAX_AMOUNT' 'FMR003.FMR003.TotalAmount' PRINT 'FMR003.FMR003.trantype1' 'FMR003.FMR003.trantype2' 'FMR003.FMR003.PC_TRAN_TYPE' HEADING "" FOOTING "" WHERE ( FMR003.FMR003.TranDate GE '&FromDate' ) AND ( FMR003.FMR003.TranDate LE '&ToDate' ) AND ( FMR003.FMR003.trantype1 NE 'V' OR 'P' ) AND ( FMR003.FMR003.PC_FUNDED_DATE GT 0 ) AND ( FMR003.FMR003.trantype2 NE 'R' ); ON TABLE HOLD AS HOLD1 END
JOIN HOLD1.HOLD1.PC_FEE_AMOUNT IN HOLD1 TO MULTIPLE FMR003.FMR003.PC_FEE_AMOUNT IN FMR003 TAG J0 AS J0 END JOIN J0.FMR003.PC_VSI_POLICY_NO AND J0.FMR003.PC_POLICY_SEQ AND J0.FMR003.PC_TRAN_SEQUENCE AND J0.FMR003.PC_SUB_SEQUENCE IN HOLD1 TO MULTIPLE FMR002.FMR002.PT_VSI_POLICY_NO AND FMR002.FMR002.PT_POLICY_SEQ AND FMR002.FMR002.PT_TRAN_SEQUENCE AND FMR002.FMR002.PT_SUB_SEQUENCE IN FMR002 TAG J1 AS J1 END DEFINE FILE HOLD1 TranDate/YYMD=DATECVT((19000000 + J0.FMR003.PC_TRAN_DATE ), 'I8YYMD','YYMD'); TranType1/A2=SUBSTR(2, J0.FMR003.PC_TRAN_TYPE, 1, 1, 1, 'A1'); TranType2/A2=SUBSTR(2, J0.FMR003.PC_TRAN_TYPE, 2, 2, 1, 'A1'); END TABLE FILE HOLD1 SUM 'HOLD1.HOLD1.TotalAmount' COMPUTE TotalAmount2/D12.2 = J0.FMR003.PC_PREMIUM_AMOUNT + J0.FMR003.PC_FEE_AMOUNT + J0.FMR003.PC_TAX_AMOUNT; HEADING "" FOOTING "" WHERE ( J0.FMR003.TranDate GE &ToDate ) AND ( J0.FMR003.TranDate LE &FromDate ) AND ( J0.FMR003.TranType1 NE 'V' OR 'P' ) AND ( J0.FMR003.PC_FUNDED_DATE GT 0 ) AND ( J0.FMR003.TranType2 EQ 'R' ); ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML
You seem to have an issue there. APP MAP is used to map (obviously) a logical or virtual name to a physical location.
Can you tell us where exactly in your disk drive (or network path) you are planning to keep your hold file? Please use an *absolute* path.
For instance, if your intended location is C:\MyHOLDFiles\mtgmart, then you should code something like:
APP MAP mtg_policy C:\MyHOLDFiles\mtgmart
Virtual name -> mtg_policy Physical location -> C:\MyHOLDFiles\mtgmart
Show us or adjust your code accordingly and test it again. To simplify debugging, add -EXIT right before the FILEDEF structure in the first piece of code just to make sure that the request process has been successful. Also, you may want to remove or comment out that FILEDEF structure which also seems "buggy" to me; you may not even need it after you fix the APP MAP statement which, to me, seems to be the culprit in this case.
That's right. First do your 'APP MAP logical physical'. Then do the 'APP HOLD logical'. Do your TABLE and HOLD. After the hold, the filedef for the hold file has automatically been issued by webfocus, so you do not need to specify it, if you're in the same request. Otherwise you do have to specify it with 'APP FI logical DISK physical'.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
One more thing: if you do use APP FI to allocate your ddname, be sure to NOT use back slashes. Use forward slashes in stead. Tip: you can use the APP HELP command to have webfocus show you a complete overview of the possibilities and syntax of the APP command.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
You've gotten some good advice, but I don't know how easy it is to follow if you haven't done this before. I would do my APP commands as follows
APP MAP MTG_POLICY /mtg_policy/mtgmart APP APPENDPATH MTG_POLICY APP HOLD MTG_POLICY
The APP HOLD command will store both your data and your master in the path. You will need to add the path and the APPENDPATH to every program that is going to use it.
I would also get away from the habit of naming a hold file HOLD1 (HOLD2, etc) when you go to running this in production it is too likely they will get overwritten.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
The easiest solution may be to use FOCCACHE to store your hold file. This approach will also eliminate the potential hazard of having multiple users running the same procedure at the same time in production (or elsewhere), because an individual FOCCACHE folder is assigned to each user session. When FOCCACHE is specified as the output location, subsequent references to the hold file will look first in FOCCACHE because it is always automatically appended to the front of the APP path. FOCCACHE remains in effect for the length of the user session.
TABLE FILE FMR003
SUM
'FMR003.FMR003.PC_PREMIUM_AMOUNT'
'FMR003.FMR003.PC_FEE_AMOUNT'
'FMR003.FMR003.PC_TAX_AMOUNT'
'FMR003.FMR003.TotalAmount'
PRINT
'FMR003.FMR003.trantype1'
'FMR003.FMR003.trantype2'
'FMR003.FMR003.PC_TRAN_TYPE'
HEADING
""
FOOTING
""
WHERE ( FMR003.FMR003.TranDate GE '&FromDate' ) AND ( FMR003.FMR003.TranDate LE '&ToDate' )
AND ( FMR003.FMR003.trantype1 NE 'V' OR 'P' ) AND ( FMR003.FMR003.PC_FUNDED_DATE GT 0 )
AND ( FMR003.FMR003.trantype2 NE 'R' );
ON TABLE HOLD AS FOCCACHE/HOLD1 <--------- specify FOCCACHE as the destination
END
-RUN
JOIN
HOLD1.HOLD1.PC_FEE_AMOUNT IN HOLD1 TO MULTIPLE FMR003.FMR003.PC_FEE_AMOUNT
IN FMR003 TAG J0 AS J0
END
JOIN
J0.FMR003.PC_VSI_POLICY_NO AND J0.FMR003.PC_POLICY_SEQ
AND J0.FMR003.PC_TRAN_SEQUENCE AND J0.FMR003.PC_SUB_SEQUENCE IN HOLD1
TO MULTIPLE FMR002.FMR002.PT_VSI_POLICY_NO AND FMR002.FMR002.PT_POLICY_SEQ
AND FMR002.FMR002.PT_TRAN_SEQUENCE AND FMR002.FMR002.PT_SUB_SEQUENCE IN FMR002
TAG J1 AS J1
END
DEFINE FILE HOLD1
TranDate/YYMD=DATECVT((19000000 + J0.FMR003.PC_TRAN_DATE ), 'I8YYMD','YYMD');
TranType1/A2=SUBSTR(2, J0.FMR003.PC_TRAN_TYPE, 1, 1, 1, 'A1');
TranType2/A2=SUBSTR(2, J0.FMR003.PC_TRAN_TYPE, 2, 2, 1, 'A1');
END
TABLE FILE HOLD1
SUM
'HOLD1.HOLD1.TotalAmount'
COMPUTE TotalAmount2/D12.2 = J0.FMR003.PC_PREMIUM_AMOUNT + J0.FMR003.PC_FEE_AMOUNT + J0.FMR003.PC_TAX_AMOUNT;
HEADING
""
FOOTING
""
WHERE ( J0.FMR003.TranDate GE &ToDate ) AND ( J0.FMR003.TranDate LE &FromDate )
AND ( J0.FMR003.TranType1 NE 'V' OR 'P' ) AND ( J0.FMR003.PC_FUNDED_DATE GT 0 )
AND ( J0.FMR003.TranType2 EQ 'R' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007