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.
This code pulls the basic information I need but now I need to pull all those active with an apptdate that is 2 days from current date, so they are notified by a phone system. I need to set this up to run automatically like a SQL stored procedure can this be done?
SET &TWODAYS=AYMD(&YYMD,2,'I8YYMD'); TABLE FILE PATIENT PRINT 'APPTHIS.APPTHIS.TIME1' 'PATIENT.PATIENT.PATIENT' 'PATIENT.PATIENT.STATUS' 'PATIENT.PATIENT.LAST' 'PATIENT.PATIENT.FIRST' 'PATIENT.PATIENT.HOMEAREA' 'PATIENT.PATIENT.HOMEPHONE' BY 'APPTHIS.APPTHIS.DATE' HEADING "" FOOTING "" WHERE PATIENT.PATIENT.STATUS EQ 'ACTIVE'; WHERE APPTHIS.APPTHIS.DATE EQ &TWODAYS;
ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ ENDSTYLE END
I am wondering, I am new to this so it may just be ignorance on my part; but I recall using a method on birthdates that required me to first convert my date format to a Smart Date could this be the problem here? Do I need to first convert the date then add Ginny's logic?
Since I don't know what your data source type is and assuming it is relational, I would convert &TWODAYS so that it matches the format of the date in your data base and compare against that.
If you do the define and convert the date to smart date, then the WHERE won't get passed to the backend relational engine resulting in an inefficient request.
Please look in the master for PATIENT and tell us how the date is defined. We can help you better that way.
This is how I began my Code there is a multiple Join but I have an End after the join and before my Table File Patient Do I need it elsewhere?
-SET &TWODAYS=AYMD(&YYMD,2,'I8YYMD'); JOIN LEFT_OUTER PATIENT.PATIENT.PATIENT IN PATIENT TO MULTIPLE APPTHIS.APPTHIS.PATIENT IN APPTHIS AS J0 END TABLE FILE PATIENT
This returns the data I had before. I just need to show all appts that will happen within 2 days from the current date. Having commented out I get the data but not with the criteria I need.
JOIN LEFT_OUTER PATIENT.PATIENT.PATIENT IN PATIENT TO MULTIPLE APPTHIS.APPTHIS.PATIENT IN APPTHIS AS J0 END TABLE FILE PATIENT -*SET &TWODAYS=AYMD(&YYMD,2,'I8YYMD'); -*WHERE APPTHIS.APPTHIS.DATE EQ &TWODAYS; -*... PRINT 'APPTHIS.APPTHIS.DATE' 'APPTHIS.APPTHIS.TIME1' 'PATIENT.PATIENT.PATIENT' 'PATIENT.PATIENT.LAST' 'PATIENT.PATIENT.FIRST' 'PATIENT.PATIENT.HOMEAREA' 'PATIENT.PATIENT.HOMEPHONE' 'PATIENT.PATIENT.STATUS' HEADING "" FOOTING "" WHERE PATIENT.PATIENT.STATUS EQ 'ACTIVE'; ON TABLE NOTOTAL ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ ENDSTYLE END
-SET &TWODAYS=AYMD(&YYMD,2,'I8YYMD');
JOIN
LEFT_OUTER PATIENT.PATIENT.PATIENT IN PATIENT TO MULTIPLE
APPTHIS.APPTHIS.PATIENT IN APPTHIS AS J0
END
TABLE FILE PATIENT
PRINT
'APPTHIS.APPTHIS.DATE'
'APPTHIS.APPTHIS.TIME1'
'PATIENT.PATIENT.PATIENT'
'PATIENT.PATIENT.LAST'
'PATIENT.PATIENT.FIRST'
'PATIENT.PATIENT.HOMEAREA'
'PATIENT.PATIENT.HOMEPHONE'
'PATIENT.PATIENT.STATUS'
HEADING
""
FOOTING
""
WHERE PATIENT.PATIENT.STATUS EQ 'ACTIVE';
WHERE APPTHIS.APPTHIS.DATE EQ &TWODAYS;
ON TABLE NOTOTAL
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
I called tech support and this is how we had to fix it.
JOIN LEFT_OUTER PATIENT.PATIENT.PATIENT IN PATIENT TO MULTIPLE APPTHIS.APPTHIS.PATIENT IN APPTHIS AS J0 END DEFINE FILE PATIENT TDAY/YYMD = '&DATEYYMD'; END
TABLE FILE PATIENT PRINT 'APPTHIS.APPTHIS.DATE' HEADING "" FOOTING "" WHERE APPTHIS.APPTHIS.DATE EQ TDAY + 2; ON TABLE NOTOTAL ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ ENDSTYLE END
This is how the code looks now but when I enter the solution into the code I am still getting the parsing error this time on Join. I have put a call in to re-open the case and will print the code when I have it working correctly.
JOIN LEFT_OUTER PATIENT.PATIENT.PATIENT IN PATIENT TO MULTIPLE APPTHIS.APPTHIS.PATIENT IN APPTHIS AS J0 END DEFINE FILE PATIENT TDAY/YYMD='&DATEYYMD'; END TABLE FILE PATIENT PRINT 'PATIENT.PATIENT.FIRST' 'PATIENT.PATIENT.LAST' 'PATIENT.PATIENT.HOMEAREA' 'PATIENT.PATIENT.HOMEPHONE' 'APPTHIS.APPTHIS.DATE' 'APPTHIS.APPTHIS.TIME1' 'PATIENT.PATIENT.STATUS' HEADING "" FOOTING "" WHERE PATIENT.PATIENT.STATUS EQ 'ACTIVE'; WHERE APPTHIS.APPTHIS.DATE EQ TDAY+2;
ON TABLE NOTOTAL ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ ENDSTYLE END
I got it to work this works but since my appt dates are Mon-Fri I need the Thursday feed to reflect TDAY+4 and Mon-Wed TDAY+2 not sure on how to do this but when I get this figured out I will add to the code to show how it was done.
TABLE FILE PATIENT PRINT 'PATIENT.PATIENT.FIRST' 'PATIENT.PATIENT.LAST' 'PATIENT.PATIENT.HOMEAREA' 'PATIENT.PATIENT.HOMEPHONE' 'APPTHIS.APPTHIS.DATE' 'APPTHIS.APPTHIS.TIME1' 'PATIENT.PATIENT.STATUS' HEADING "" FOOTING "" WHERE PATIENT.PATIENT.STATUS EQ 'ACTIVE'; WHERE APPTHIS.APPTHIS.DATE EQ TDAY+4; ON TABLE NOTOTAL ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $ ENDSTYLE END
If PATIENT is a relational data base, I do not recommend your solution. I would go back to my original solution which will generate more efficient SQL. If your problem is with the JOIN, then get that fixed.
Using a defined field to test against a data base field disables optimization and the WHERE is not passed.
If PATIENT is not relational, then ignore this post.