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 trying to print data from a file to an output file that can contain multiple occurences of data for a student, concerning semesters the student has attended a college. In other words, a student might have attended in Fall semester 2002, then spring semester 2004, then summer semester 2005 and so on. Here is what I'm using to try:
-* TABLE FILE A057SSN -* -REPEAT LOOPDONE AA191 TIMES -* PRINT ACKEY STUDYID STU_ID TERM_NAME RT14A AS RT14A RT005 ACAD_STATUS AS ACAD_STATUS AA640 AS AA640 AA650 AS AA650 AA671 AS AA671 BY ACKEY BY STU_ID -LOOPDONE ON TABLE HOLD AS E002A FORMAT FOCUS INDEX ACKEY END -RUN -*
However, it is not working. On the REPEAT line, I have -REPEAT LOOPDONE AA191 TIMES, where field AA191 is a record occurrence counter that indicates how many times this information repeats for a student. The error message I receive is:
0 ERROR AT OR NEAR LINE 113 IN PROCEDURE ED002 FOCEXEC 0(FOC303) CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -REPEAT LOOPDONE AA191 TIMES
Am I using a correct way of trying to repeat my data? If someone has a suggestion I would be happy to receive it. The manual wasn't exactly clear. Thanks in advance!This message has been edited. Last edited by: webmeister,
To add to the solution given by our young apprentice
The reason is (as has been said many times before) that dialogue manager is parsed before the table request in this example. Therefore the request has not been executed and therefore no data values are available. Therefore a pre-extract of the value you want, and it's placement into a variable, is the way to go.
Note the use of -RUN after the table request to force execution of the stack so that the file is created before the dialogue manager -READ statement.
May the force etc. etc.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Many thanks for the follow-on comments and explanations.
Pat, I am looking at, for each student, one record per term. In other words, having something like this:
Student001 Term1 info Student001 Term2 info Student001 Term3 info Student002 Term1 info Student003 Term2 info Stuednt003 Term4 info
and so forth. I know this isn't the "prettiest" or most efficient listing out of data, but it's a requirement from the Dept. of Education, and that's what the data is the way it is.
Forget about -REPEAT. You don't need to generate multiple PRINT verbs. (In fact, you cannot have multiple PRINT verbs in a TABLE request.)
Use something like this:
TABLE FILE XXX
SUM
(attributes of the student)
BY student_key
PRINT
(attributes of the semester course)
BY student_key
BY semester_course_key(s)
ON TABLE HOLD [FORMAT FOCUS]...
The BY phrases provide for storing multiple rows per student.
If you use "FORMAT FOCUS", the result will be a two-segment, parent-child structure -- with the columns from the SUM part stored in the parent segment, and the additional columns from the PRINT part stored in the child segment -- reflecting the one-to-many relationship of student to course registration.
If you omit Format Focus, the internal processing still uses that structure for accumulating the data, but the stored result will be flattened, with the student' data replicated in each of the student's Course rows. But it will still have one row per student per course.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
Jack's response hit the crux of my question, if you are wanting one record per student per term you don't need a -REPEAT. If you wanted one record per student containing the terms, the -REPEAT is in the wrong place. As Jack pointed out, you can not have multiple PRINT statements in a TABLE command. You can also do this as a single segment with:
TABLE FILE A057SSN
PRINT STUDYID STU_ID TERM_NAME RT14A AS RT14A RT005 ACAD_STATUS AS ACAD_STATUS AA640 AS AA640 AA650 AS AA650 AA671 AS AA671 BY ACKEY BY STU_ID NOPRINT
ON TABLE HOLD AS E002A FORMAT FOCUS END
But I have to wonder what your original input format is and what either buys you.
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
Thanks for replying and helping out a "forest for the trees" issue. As far as what any of it bought me, not much...... this was a request from the Dept. of Ed., and their specifics were (and continue to be) tacky. One record per is about as close to normalization as nothing, but that's our wonderful government folk. I think the request came from somewhere in the 60's, when one record per was the norm.
In any case, thanks for thaking the time and effor to reply and to offer help; I appreciate it.