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.
I'm new to this forum and this may have been covered before but here goes.... I am using Mainframe Focus 7.1.1. I am executing a fex through JCL and I would like to pass the last business date from my JCL to my Focexec. We have a table established for backdates which takes into consideration all Holidays, weekends, etc., that we use when executing COBOL programs.
When I was executing the fex directly from Focus, I prompted for the last business date and used the date entered to test for desired records in my DB2 database. Now that this fex to be run using JCL the operators never see the prompt because they are in the TSO environment. I would like to pass the last business date from the JCL/Proc to my Focexec for testing. Does anyone know how to do that?
I know it's been a while but I just happened upon this post. You can pass any parameter to a FOCEXEC very easily. If FRED is the name of your FOCEXEC, and &BUSDATE is the FOCUS amper variable you need to pass to it for screening purposes, and you already have the busdate value available in the JCL stream, then just include:
EX FRED BUSDATE=010101
where "010101" is your parameter name for the date in the JCL stream.
Alternatively, if the last business date is stored in a flat file somewhere, then you can use -READ to read the parm from the external file with code similar to this in a FOCEXEC.
-READ DD1 &&BUSDATE EX FRED BUSDATE=&&BUSDATE
(DD1 would be allocated to the flat file that contains the busdate value).
Keep in mind that FOCUS &VARIABLES cannot be resolved directly in JCL (as the DM command processor is not invoked), so if you are using FOCUS &VARS or &&VARS, make sure to use these within a FOCEXEC.
Hope that helps.
-Chris
Posts: 55 | Location: New York | Registered: March 07, 2003
The REAL question is HOW you are going to get this date in JCL? I'm guessing that you'll run a step, which executes your program (or it COULD be FOCUS), to place the 'last business date' into some dataset. Then, the issue is, 'how can FOCUS read that date?'. That's EASY.
In the Dialogue Manager, you can read and write using a -READ and -WRITE statement. Assume the file is called 'lastdate.data'. First, you allocate it using either JCL (ugly), or a DYNAM command (keeping it within FOCUS), like this:
DYNAM ALLOC DD LDATE DA LASTDATE.DATA SHR REU -RUN
You need the '-RUN', so the DYNAM executes, BEFORE the next -READ.
Then, you can read that file with a -READ (assuming the value is 8 characters):
To expand on this does anyone have an example of using a JCL variable to pass a value to a focexec variable. The only way I see right now would be to write a REXX to create a dynamic sysin before the Focus step, but it would be nice if there was a quicker/cleaner way.
Jayem Nolan RBC
Posts: 10 | Location: Montreal | Registered: May 25, 2004
Lisa, i do this the really lazy way: given that &YYMD is the system date variable I get the day of week, decode it to some adjustment value, subtract that adjustment value from the current day, and that's my test value -SET &DAY = DOWK(&YYMD,'A3'); -SET &ADJ = DECODE &DAY('SAT' 1 'SUN' 2 ELSE 0); -SET &ADJ = -1 * ADJ ; -DOAGAIN -SET &LASTDAY = AYMD(&YYMD, &ADJ, 'I8YYMD'); TABLE FILE whatever ..do stuff IF SOMEDATE EQ &LASTDAY END -RUN -IF &LINES GT 0 GOTO PROCESS; -SET &ADJ = &ADJ - 1 ; -GOTO DOAGAIN ; -* or you could bail out and not reloop for yesterday -PROCESS This way if i have data, we must have been open and in operation. If i have no data, it must have been a holiday. This is the most painless, least elegant way i can think of.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003