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.
-DEFAULT &AID_YEAR = '0607'
-SET &D_OVERRIDE_YR = ('DO'||SUBSTR(4,&AID_YEAR, 3, 4, 2, 'A2')); <==== This Variable
JOIN SPRIDEN_PIDM IN SPRIDEN TO RRRAREQ_PIDM IN RRRAREQ AS J0
JOIN RRRAREQ_PIDM IN SPRIDEN TO SPBPERS_PIDM IN SPBPERS AS J1
TABLE FILE SPRIDEN
PRINT
RRRAREQ_TREQ_CODE
RRRAREQ_TRST_CODE
RRRAREQ_STAT_DATE/M-D-YY
BY RRRAREQ_STAT_DATE NOPRINT
BY SPRIDEN_ID
BY SPRIDEN_LAST_NAME
BY SPRIDEN_FIRST_NAME
BY SPBPERS_SSN
WHERE SPRIDEN_CHANGE_IND EQ MISSING;
WHERE RRRAREQ_AIDY_CODE EQ '&AID_YEAR.(FIND ROBINST_AIDY_CODE IN ROBINST).AID_YEAR.';
WHERE RRRAREQ_TREQ_CODE EQ &TREQ_CODE.(OR(<DEPENDENCY_OVERRIDE,&D_OVERRIDE_YR>,<PJ_DEPENDENT,SPCOND>,<PJ_INDEPENDENT,SPCONI>)).TREQ_CODE.; <=== Should be here
WHERE RRRAREQ_TRST_CODE EQ &TRST_CODE.(OR(<READY FOR REVIEW,N>,<SATISFIED,S>,<INCOMPLETE,I>,<DENIED,X>,<WAIVED,W>)).TRST_CODE.;
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END
The error I am getting is:
0 ERROR AT OR NEAR LINE 18 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH: &D_OVERRIDE_YR
0 ERROR AT OR NEAR LINE 18 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC015) THE TEST VALUE IS LONGER THAN THE FIELD FORMAT LENGTH: &D_OVERRIDE_YR
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
Is it not possible to put a variable in the multi select box?
apparently not. i just tried it with a car file example
-SET &MYVAR = 2 ;
-SET &ECHO = ALL ;
TABLE FILE CAR LIST CAR SALES SEATS
WHERE SEATS EQ &SEATS.(OR(<2SEATER, &MYVAR.EVAL >,<3SEATER,3>,<4SEATER,4>)).NUMSEATS.;
and it seems that the underlying javascript is taking that value as a character string I even stuck an eval on it...no cigar. See the "" around the entry? so i would try buiding the entire WHERE statment as a long string from your &vars and then entering it as a &MYWHERE.EVAL
I got a post from Alan via email. Not sure why it isn't showing up here:
-DEFAULT &AID_YEAR = '0607'
-SET &D_OVERRIDE_YR = SUBSTR(4,&AID_YEAR, 3, 4, 2,'A4');
-SET &O_YR = 'DO' || &D_OVERRIDE_YR;
-SET &O_YR = TRIM('T', &O_YR, 4, ' ', 2, 'A4');
-SET &SRCH_STRING = '&TREQ_CODE.(OR(<DEPENDENCY_OVERRIDE,' | &O_YR | '>,<PJ_DEPENDENT,SPCOND>,<PJ_INDEPENDENT,SPCONI>)).TREQ_CODE.;';
JOIN SPRIDEN_PIDM IN SPRIDEN TO RRRAREQ_PIDM IN RRRAREQ AS J0
JOIN RRRAREQ_PIDM IN SPRIDEN TO SPBPERS_PIDM IN SPBPERS AS J1
TABLE FILE SPRIDEN
PRINT
RRRAREQ_TREQ_CODE
RRRAREQ_TRST_CODE
RRRAREQ_STAT_DATE/M-D-YY
BY RRRAREQ_STAT_DATE NOPRINT
BY SPRIDEN_ID
BY SPRIDEN_LAST_NAME
BY SPRIDEN_FIRST_NAME
BY SPBPERS_SSN
WHERE SPRIDEN_CHANGE_IND EQ MISSING;
WHERE RRRAREQ_AIDY_CODE EQ '&AID_YEAR.(FIND ROBINST_AIDY_CODE IN ROBINST).AID_YEAR.';
WHERE RRRAREQ_TREQ_CODE EQ &SRCH_STRING;
WHERE RRRAREQ_TRST_CODE EQ &TRST_CODE.(OR(<READY FOR REVIEW,N>,<SATISFIED,S>,<INCOMPLETE,I>,<DENIED,X>,<WAIVED,W>)).TRST_CODE.;
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
And now, I am getting the following error message:
0 ERROR AT OR NEAR LINE 23 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: &TREQ_CODE
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT
Anyway, try it, pretty sure it won't work. Unfortunately, at UNCG, JavaScript within HTML is not utilized; Susannah had a great idea, but, not supported.
So, this was my workaround at UNCG:
-SET &ECHO=ALL; -SET &MONTH = EDIT(&DATEYYMD,'$$$$$99'); -SET &CUR_YR = EDIT(&DATEYYMD,'9999'); -SET &YR1 = IF &MONTH LE '06' THEN &CUR_YR ELSE &CUR_YR + 1; -SET &YR2 = &YR1 - 1; -SET &YR3 = &YR1 - 2; -SET &YR4 = &YR1 - 3; -SET &YR5 = &YR1 + 1; APP HOLD FINANCE -RUN CREATE FILE FY_YEAR -RUN MODIFY FILE FY_YEAR FREEFORM FY_DATE MATCH FY_DATE ON NOMATCH INCLUDE ON MATCH REJECT DATA &YR1.EVAL &YR2.EVAL &YR3.EVAL &YR4.EVAL &YR5.EVAL END -RUN
Then, in your fex:
WHERE FISCAL_YEAR EQ '&FY.(FIND FY_DATE IN FY_YEAR).Fiscal Year.';
Moreland called me back, start Monday, the 5th. See you then. If you like, give me a buzz...
Tom (804) 244-6195
P.S. Modified to remove Graemlin's.....This message has been edited. Last edited by: Tom Flynn,
There is a way to achieve this in WebFocus, but it is a little messy. Basically you have to fool the auto-prompt parser.
-DEFAULT &AID_YEAR = '0607'
-SET &O_Y = ('DO'||SUBSTR(4,&AID_YEAR, 3, 4, 2, 'A2'));
-SET &SRCH_STRING = 'WHERE RRRAREQ_TREQ_CODE EQ &TREQ_CODE.(OR(<DEPENDENCY_OVERRIDE,&O_Y>,<PJ_DEPENDENT,SPCOND>,<PJ_INDEPENDENT,SPCONI>)).TREQ_CODE.;';
-IF &TRST_CODE.EXIST GOTO :NOPROMPT;
TABLE FILE SPRIDEN
PRINT
RRRAREQ_TREQ_CODE
WHERE RRRAREQ_AIDY_CODE EQ '&AID_YEAR.(FIND ROBINST_AIDY_CODE IN ROBINST).AID_YEAR.';
&SRCH_STRING.EVAL
WHERE RRRAREQ_TRST_CODE EQ &TRST_CODE.(OR(<READY FOR REVIEW,N>,<SATISFIED,S>,<INCOMPLETE,I>,<DENIED,X>,<WAIVED,W>)).TRST_CODE.;
END
-EXIT
-:NOPROMPT
-SET &TREQ_CODE = IF &TREQ_CODE CONTAINS '&O_Y' THEN &TREQ_CODE | ' OR ' | '''' | &O_Y | ''''
- ELSE &TREQ_CODE;
JOIN SPRIDEN_PIDM IN SPRIDEN TO RRRAREQ_PIDM IN RRRAREQ AS J0
JOIN RRRAREQ_PIDM IN SPRIDEN TO SPBPERS_PIDM IN SPBPERS AS J1
TABLE FILE SPRIDEN
PRINT
RRRAREQ_TREQ_CODE
RRRAREQ_TRST_CODE
RRRAREQ_STAT_DATE/M-D-YY
BY RRRAREQ_STAT_DATE NOPRINT
BY SPRIDEN_ID
BY SPRIDEN_LAST_NAME
BY SPRIDEN_FIRST_NAME
BY SPBPERS_SSN
WHERE SPRIDEN_CHANGE_IND EQ MISSING;
WHERE RRRAREQ_AIDY_CODE EQ '&AID_YEAR';
WHERE RRRAREQ_TREQ_CODE EQ &TREQ_CODE;
WHERE RRRAREQ_TRST_CODE EQ &TRST_CODE;
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
END
I think that's it, if not let me know and I will recheck, I've had this working, but on a much simpler syntax, so please check this syntax.
ONE ERROR FIXED. TWO ERRORS FIXED THREE ERRORS FIXED, must take more care!This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Even the first TABLE is not necessary. The Auto Prompt parser is looking for certain strings, it doesn't actually seem to care where they occur.
So you could have in the first part:
-DEFAULT &AID_YEAR = '0607'
-SET &O_Y = ('DO'||SUBSTR(4,&AID_YEAR, 3, 4, 2, 'A2'));
-SET &SRCH_STRING = 'WHERE RRRAREQ_TREQ_CODE EQ &TREQ_CODE.(OR(<DEPENDENCY_OVERRIDE,&O_Y>,<PJ_DEPENDENT,SPCOND>,<PJ_INDEPENDENT,SPCONI>)).TREQ_CODE.;';
-IF &TRST_CODE.EXIST GOTO :NOPROMPT;
WHERE RRRAREQ_AIDY_CODE EQ '&AID_YEAR.(FIND ROBINST_AIDY_CODE IN ROBINST).AID_YEAR.';
&SRCH_STRING
WHERE RRRAREQ_TRST_CODE EQ &TRST_CODE.(OR(<READY FOR REVIEW,N>,<SATISFIED,S>,<INCOMPLETE,I>,<DENIED,X>,<WAIVED,W>)).TRST_CODE.;
-EXIT
-:NOPROMPT
As I say, the parser is purely searching for known strings with &variables in them.
When I say -IF &TRST_CODE.EXIST GOTO :NOPROMPT; all I am saying is has there been a value set for &TRST_CODE, or basically have we been through auto-prompt yet. If so lets get to the real work, the TABLE request, if not, it should be auto prompt parsing the code, so carry on until the -EXIT. Oh, the .EVAL isn't required on &SRCH_STRING, that was me in a hurry.
Hope that helps. If not I'll try another explanation! It is a bit weird, yes.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007