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.
The simplest one is to just PRINT all the fields, no BY fields.
I would also use TAGs with you join, to identify the fields specifically.
e.g.
JOIN LEFT_OUTER AAI IN V TAG A TO AAI IN HAI TAG B AS JOIN8
TABLE FILE V
PRINT
F_NAME
L_NAME
SCC
SCN
ST
SD
A.AAI
BY A.AAI
ON TABLE PCHOLD FORMAT EXL2K
END
Waz, I commented the BY field and nothing changed, I still get the error. Tagging didn't do much.
Danny, Actually, I didn't develop this report so I have no idea why they used LEFT_OUTER JOIN.
V is a Hold file the gets generated from a SQLMSS query. Below is the code for the two HOLD files.
JOIN AP.AP.AAI IN AP TO IA.IA.F1 IN IA TAG JOIN6 AS JOIN6 END
TABLE FILE AP
PRINT
AAI
F_NAME
L_NAME
BY AAI NOPRINT
ON TABLE HOLD AS HAI
END
TABLE FILE HAI
PRINT
AAI
BY AAI NOPRINT
ON TABLE HOLD AS HAI
END
SQL SQLMSS
SELECT F1
F2
F3
FROM [TABLE]
WHERE [CONDITION]
TABLE FILE SQLOUT
PRINT
F1
F2
BY F1 NOPRINT
ON TABLE HOLD AS V
END
JOIN F1 IN V TO ALL S1 IN SS AS JOIN1
JOIN F1 IN V TO F1 IN IA AS JOIN2
JOIN F1 IN V TO SPI IN SEE AS JOIN 3
JOIN F1 IN V TO ALL AA IN AP AS JOIN4
END
TABLE FILE V
PRINT
F1
F_NAME
L_NAME
SCC
SCN
ST
SD
AAI
WHERE ST IS NOT MISSING
BY AAI
WHERE [CONDITION]
ON TABLE HOLD AS V FORMAT FOCUS INDEX ID
END
JOIN LEFT_OUTER AAI IN V TO AAI IN HAI AS JOIN8
END
TABLE FILE V
PRINT
F_NAME
L_NAME
SCC
SCN
ST
SD
AAI
BY AAI
ON TABLE PCHOLD FORMAT EXL2K
END
WebFOCUS Developer Studio 8104 / Windows 7 / HTML and Excel
I suggest you clean up the code a bit and try again.
1. Your first JOIN, a one-liner, concludes with END. END (when present) should be on a line by itself, same as with TABLE or DEFINE.
2. You have requests where the Hold file has the same name as the source file (HAI once, and V twice). Keep all the filenames distinct.
3. Some of those reused filenames are involved in JOINs. I'm not sure a priori which master and which data will be used at run-time in the subsequent TABLE requests; play it safe and avoid the ambiguity.
4. "JOIN F1 IN V TO SPI IN SEE AS JOIN 3" -- note the space before "3"
5. It's best practice to CLEAR joins as soon as they are no longer needed.
In particular...
quote:
JOIN F1 IN V TO ALL S1 IN SS AS JOIN1 JOIN F1 IN V TO F1 IN IA AS JOIN2 JOIN F1 IN V TO SPI IN SEE AS JOIN 3 JOIN F1 IN V TO ALL AA IN AP AS JOIN4 END
TABLE FILE V . . . ON TABLE HOLD AS V FORMAT FOCUS INDEX ID END
JOIN LEFT_OUTER AAI IN V TO AAI IN HAI AS JOIN8 END
TABLE FILE V . . . ON TABLE PCHOLD FORMAT EXL2K END
... the interpreter will see five JOINs (from "V" to other sources) in effect, four of which were issued against a different "V", so there's ample opportunity for confusion.
You may want to throw in ??F filename CHECK FILE filename PICT to see exactly what logical structure that TABLE is dealing with. I'd do that with the operative code as-is, and again after modification, so you can witness the effect of your changes.
Let us know how it plays out.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Danny, The last join is needed for "PN". My mistake, I didn't include it in the first post. I removed the second HAI table and I was getting the same error. I get (FOC030) error on the table before the last join. It always points to line number where "END" before the last join is coded.
j.gross, Thanks for suggesting cleaning up the code. It does help when your code is nice and neat. I implemented some of the changes you suggested. For the debugging step where do you mean to throw the "??F filename CHECK FILE filename PICT"?
JOIN AP.AP.AAI IN AP TO IA.IA.F1 IN IA TAG JOIN6 AS JOIN6
END
TABLE FILE AP
PRINT
AAI
PN
F_NAME
L_NAME
BY AAI NOPRINT
ON TABLE HOLD AS HAI
END
TABLE FILE HAI
PRINT
AAI
PN
BY AAI NOPRINT
ON TABLE HOLD AS HAI
END
SQL SQLMSS
SELECT F1,
F2,
F3,
F4,
F5,
F6,
F7
FROM [TABLE]
WHERE [CONDITION]
TABLE FILE SQLOUT
PRINT
F1
F3
BY F1 NOPRINT
ON TABLE HOLD AS V
END
JOIN F1 IN V TO ALL S1 IN SS AS JOIN1
JOIN F1 IN V TO F1 IN IA AS JOIN2
JOIN F1 IN V TO SPI IN SEE AS JOIN3
JOIN F1 IN V TO ALL AA IN AP AS JOIN4
END
TABLE FILE V
PRINT
F1
F_NAME
L_NAME
SCC
SCN
ST
SD
AAI
WHERE ST IS NOT MISSING
BY AAI
WHERE [CONDITION]
ON TABLE HOLD AS V FORMAT FOCUS INDEX ID
END
JOIN LEFT_OUTER AAI IN V TO AAI IN HAI AS JOIN8
END
TABLE FILE V
PRINT
F_NAME
L_NAME
SCC
SCN
ST
SD
AAI
HAI.PN
BY AAI
ON TABLE PCHOLD FORMAT EXL2K
END
This message has been edited. Last edited by: Ali,
WebFOCUS Developer Studio 8104 / Windows 7 / HTML and Excel
Ali- Here's what I suggest you do. My changes to operative code are in lower-case.
JOIN AP.AP.AAI IN AP TO IA.IA.F1 IN IA TAG JOIN6 AS JOIN6
END
??f ap
-run
TABLE FILE AP
PRINT
AAI
PN
F_NAME
L_NAME
BY AAI NOPRINT
ON TABLE HOLD AS HAI format focus index aai
END
join clear *
-run
SQL SQLMSS
SELECT F1,
F2,
F3,
F4,
F5,
F6,
F7
FROM [TABLE]
WHERE [CONDITION]
TABLE FILE SQLOUT
PRINT
F1
F3
BY F1 NOPRINT
ON TABLE HOLD AS V
END
-run
join clear *
JOIN F1 IN V TO ALL S1 IN SS AS JOIN1
JOIN F1 IN V TO F1 IN IA AS JOIN2
JOIN F1 IN V TO SPI IN SEE AS JOIN3
JOIN F1 IN V TO ALL AA IN AP AS JOIN4
END
??f v
-run
TABLE FILE V
PRINT
F1
F_NAME
L_NAME
SCC
SCN
ST
SD
BY AAI
where ST IS NOT MISSING
WHERE [CONDITION]
ON TABLE HOLD AS v2
-* FORMAT FOCUS not needed for the Join and Table below.
-* INDEX ID <== ID is not listed as a column of the request.
-* it's also not referenced later in the code provided.
END
join clear *
JOIN LEFT_OUTER AAI IN v2 TO AAI IN HAI AS JOIN8
END
?ff v2
check file v2 pict
-run
TABLE FILE v2
PRINT
F_NAME
L_NAME
SCC
SCN
ST
SD
AAI
HAI.PN
BY AAI
ON TABLE PCHOLD FORMAT EXL2K
END
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Ali: Adding CHECK FILE V just before the final TABLE FILE V would force WF to re-read and parse the synonyms involved (for the host file and all that are joined to it) at that point. If the FOC030 is caused by hold-overs from earlier parsing (for the same filename) that has been rendered invalid by subsequent code (e.g., re-holding to the same filename), that may clear the FOC030.
Of course that's a rather fragile solution -- the next one to touch the code may presume the CHECK FILE is extraneous scaffolding, delete it, and fall into the same hole you did. Better to first clean up the program, and then address the problem on a clean drawing board if it persists.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Jack and Danny, Thank you for your help. The report is working now and what I did is replaced the SQLMSS portion of the code with normal FOCUS code and sorted by AAI. I did implement your suggestions and the code looks better now.
Marking this discussion as [SOLVED]
Ali
WebFOCUS Developer Studio 8104 / Windows 7 / HTML and Excel