Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Forcing all rows to print
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Forcing all rows to print
 Login/Join
 
Platinum Member
posted
Code:
 TABLE FILE SACRSFNL
SUM 
     'SACRSFNL.SEG01.TERM'
     'SACRSFNL.SEG01.SITE_ID'
     'SACRSFNL.SEG01.START_DT/YY-M-D'
     'SACRSFNL.SEG01.TITLE'
     'SACRSFNL.SEG01.COURSE_ID'
     'SACRSFNL.SEG01.DESCR'
     'SACRSFNL.SEG01.PUBLISH'
     'SACRSFNL.SEG01.END_DT/YY-M-D'
     'SACRSFNL.SEG01.TEMPLATE'
BY 'SACRSFNL.SEG01.COURSE_ID' NOPRINT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT COMMA
ON TABLE SET HTMLCSS ON 


I am getting it to output okay with the correct lines but in the term spot, probably since it is summed, it only prints the first line value and all others are blank. How can I force it to print term on each row?

malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Platinum Member
posted Hide Post
Try adding:

ON TABLE SET BYDISPLAY ON to your procedure to print repeating values.

Norb


prod:7.6.9, win2k3 mre, caster, bid, devstudio 7.6.9
 
Posts: 242 | Location: Minneapolis | Registered: February 16, 2006Report This Post
Platinum Member
posted Hide Post
I still get:
 "                                                  ","1108.11613 ",20100823,""ACTG     241       79A1-8W1-ACCOUNTING PRINCIPLES I"       ","ACTG     241       79A1-8W1","ACCOUNTING PRINCIPLES I       ","0",20101015,"template.online          "
"                                                  ","1108.22184 ",20101025,""BA       241       79B1-8W2-QUANTITATIVE METHODS"          ","BA       241       79B1-8W2","QUANTITATIVE METHODS          ","0",20101217,"template.online          "
"                                                  ","1108.10549 ",20100823,""HIST     231       0080-1-US HISTORY TO 1877"              ","HIST     231       0080-1  ","US HISTORY TO 1877            ","0",20101217,"template.webenhanced     "
"                                                  ","1108.12665 ",20100823,""MATH     232       0081-1-APPLIED STATISTICS"              ","MATH     232       0081-1  ","APPLIED STATISTICS            ","0",20101217,"template.webenhanced     "
"                                                  ","1108.10999 ",20100823,""PSYC     433       0080-1-ABNORMAL PSYCHOLOGY"             ","PSYC     433       0080-1  ","ABNORMAL PSYCHOLOGY           ","0",201012 


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
SET BYDISPLAY=ON would display repeated values on the BY field, but "TERM" is a regular display field so BYDISPLAY wouldn't help you there.

Please change the request to PRINT and show us what data is being returned to you. Also, don't forget to enclose it in
[code]
tags for ease of reading.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Here is the info printed. I put it in the tags so hopefully that works too.

 "Fall 2010 1st 8 Weeks                             ","1108.11613 ",20100823,""ACTG     241       79A1-8W1-ACCOUNTING PRINCIPLES I"       ","ACTG     241       79A1-8W1","ACCOUNTING PRINCIPLES I       ","0",20101015,"template.online          "
"                                                  ","1108.11613 ",20100823,""ACTG     241       79A1-8W1-ACCOUNTING PRINCIPLES I"       ","ACTG     241       79A1-8W1","ACCOUNTING PRINCIPLES I       ","0",20101015,"template.online          "
"Fall 2010 2nd 8 Weeks                             ","1108.12184 ",20101025,""BA       241       79B1-8W2-QUANTITATIVE METHODS"          ","BA       241       79B1-8W2","QUANTITATIVE METHODS          ","0",20101217,"template.online          "
"                                                  ","1108.12184 ",20101025,""BA       241       79B1-8W2-QUANTITATIVE METHODS"          ","BA       241       79B1-8W2","QUANTITATIVE METHODS          ","0",20101217,"template.online          "
"                                                  ","1108.22184 ",20101025,""BA       241       79B1-8W2-QUANTITATIVE METHODS"          ","BA       241       79B1-8W2","QUANTITATIVE METHODS          ","0",20101217,"template.online          "
"Fall 2010                                         ","1108.12318 ",20100823,""HIST     231       0080-1-US HISTORY TO 1877"              ","HIST     231       0080-1  ","US HISTORY TO 1877            ","0",20101217,"template.webenhanced     "
"                                                  ","1108.12318 ",20100823,""HIST     231       0080-1-US HISTORY TO 1877"              ","HIST     231       0080-1  ","US HISTORY TO 1877            ","0",20101217,"template.webenhanced     "
"                                                  ","1108.10549 ",20100823,""HIST     231       0080-1-US HISTORY TO 1877"              ","HIST     231       0080-1  ","US HISTORY TO 1877            ","0",20101217,"template.webenhanced     "
"Fall 2010                                         ","1108.12665 ",20100823,""MATH     232       0081-1-APPLIED STATISTICS"              ","MATH     232       0081-1  ","APPLIED STATISTICS            ","0",20101217,"template.webenhanced     "
"                                                  ","1108.12665 ",20100823,""MATH     232       0081-1-APPLIED STATISTICS"              ","MATH     232       0081-1  ","APPLIED STATISTICS            ","0",20101217,"template.webenhanced     "
"Fall 2010                                         ","1108.12619 ",20100823,""PSYC     433       0080-1-ABNORMAL PSYCHOLOGY"             ","PSYC     433       0080-1  ","ABNORMAL PSYCHOLOGY           ","0",20101217,"template.webenhanced     "
"                                                  ","1108.12619 ",20100823,""PSYC     433       0080-1-ABNORMAL PSYCHOLOGY"             ","PSYC     433       0080-1  ","ABNORMAL PSYCHOLOGY           ","0",20101217,"template.webenhanced     "
"                                                  ","1108.10999 ",20100823,""PSYC     433       0080-1-ABNORMAL PSYCHOLOGY"             ","PSYC     433       0080-1  ","ABNORMAL PSYCHOLOGY           ","0",20101217,"template.webenhanced     "
 


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
If TERM is an alpha field, by summing it you are only getting the last value in the sort group COURSE_ID.

I recommend adding a sort (BY) on TERM with BYDISPLAY set to on and taking the column out of the SUM part of the report.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Malinda, based on the data you posted which was obtained by means of TABLE FILE PRINT, I can see that some of the values for term are actually blank. Why is that?

Ginny's suggestion is usually the way to go but in your particular case I'm afraid you'd still have issues considering the blank or MISSING values you have for the TERM field in your source data.

Give it a try anyway to see what you get. If it still does not work, try something like:
TABLE FILE SACRSFNL
SUM 
     MAX.TERM  <-- Note the MAX. prefix here!!
     SITE_ID
     START_DT/YY-M-D
     TITLE
     COURSE_ID
     DESCR
     PUBLISH
     END_DT/YY-M-D
     TEMPLATE
BY COURSE_ID NOPRINT
END


As any "printable" alphabetic and numeric character have higher ASCII codes than spaces, getting the MAX.TERM in each group will show you any TERM value that is not blank within each COURSE_ID.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
If you have changed to print and you're still getting blank rows, my suggestion is sto remove the NOPRINT from the course_id field. You'll probably see that there are different values which is causing the output you are getting. It appears that all the other field values are identical, so if you just summed them up, the alpha field course_id would be displaying the last value of the field within the sort group which appears to be blank.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
And if those rows are truly duplicated, just eliminate every record which has TERM EQ ' ' and you should get one of each with a correct course_id and term.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
It worked to add the max. I am thinking that the blank terms are coming in with a previous join....can't figure out logically why they are blank but it duplicates it based on how many sequence numbers for the class note are associated with that class. Lists the first as the term and all others as blank.

Is it better to use the max or the where term ne ' ' statement?

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Platinum Member
posted Hide Post
One thing that I am going to try is doing each data set in its own hold file and then joining those instead of getting 1 hold file, then joining back to add in the rest - which I think is what is causing all the duplication. I will try this and let you know what I get.

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
It's probably better to eliminate unwanted records (WHERE TERM NE ' '), especially if this will allow you to change the verb from SUM to PRINT. SUMming may produce unwanted results if there aren't enough BY phrases and/or prefix operators (like MAX.) to prevent the inappropriate aggregation of numeric columns or the incorrect reduction of alphanumeric columns to the last value.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
The only thing about the where is that it actually gets rid of the line that I want to keep. The site_id that I want to keep is usually the last one listed but it usually has a blank term associated with it.


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Expert
posted Hide Post
quote:
I am thinking that the blank terms are coming in with a previous join....can't figure out logically why they are blank but it duplicates it based on how many sequence numbers for the class note are associated with that class.

Then add an additional line in that part of the extract to have the HIGHEST 1 CLASS_NOTE (or what ever the field is called) so that you then have a ?? to 1 join when adding this hold file into your join(s).

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, 2004Report This Post
Platinum Member
posted Hide Post
Here is code from creating each set in its own hold file, joining those and outputing. It does not creating the duplicate/blank terms like before but I am now having problems getting the right site_id.

JOIN
 LEFT_OUTER CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM IN CSQASC_CLASS_TBL
 TO MULTIPLE CSQASC_TERM_VAL_TBL.CSQASC_TERM_VAL_TBL.STRM IN CSQASC_TERM_VAL_TBL
 TAG J0 AS J0
 END
JOIN
 LEFT_OUTER CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CRSE_ID
 AND CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CRSE_OFFER_NBR
 AND CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM
 AND CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE
 AND CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION IN CSQASC_CLASS_TBL
 TO MULTIPLE CSQASC_CLASS_NOTES.CSQASC_CLASS_NOTES.CRSE_ID
 AND CSQASC_CLASS_NOTES.CSQASC_CLASS_NOTES.CRSE_OFFER_NBR
 AND CSQASC_CLASS_NOTES.CSQASC_CLASS_NOTES.STRM
 AND CSQASC_CLASS_NOTES.CSQASC_CLASS_NOTES.SESSION_CODE
 AND CSQASC_CLASS_NOTES.CSQASC_CLASS_NOTES.CLASS_SECTION IN CSQASC_CLASS_NOTES
 TAG J4 AS J4
 END
DEFINE FILE CSQASC_CLASS_TBL
CALL_NO_CLASS/A5=EDIT (CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_NBR, '99999');
SITE_ID_1/A11=CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM||'.'||CALL_NO_CLASS;
SESSION/A11=
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '8W1' THEN '1st 8 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '8W2' THEN '2nd 8 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '5W1' THEN '1st 5 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '5W2' THEN '2nd 5 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '5W3' THEN '3rd 5 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '4W1' THEN '1st 4 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '4W2' THEN '2nd 4 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '4W3' THEN '3rd 4 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W1' THEN '1st 2 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W2' THEN '2nd 2 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W3' THEN '3rd 2 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W4' THEN '4th 2 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W5' THEN '5th 2 Weeks' ELSE
IF CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE EQ '2W6' THEN '6th 2 Weeks' ELSE ' ';
COURSE_ID/A27=CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SUBJECT | CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CATALOG_NBR |' '| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION || '-' || CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE;
COURSE_ID_1/A24=CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SUBJECT | CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CATALOG_NBR |' '| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION;
SEM/A1=EDIT ( CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM , '$$$9');
SECTION_NO/A2=EDIT (CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION, '99$$');
TERM/A50=
IF ((COURSE_ID_1 EQ 'COLG010 01') AND (SEM EQ '8' OR '1')) THEN '2010 Year Long' ELSE
IF (SECTION_NO EQ '81' AND SEM EQ '8') THEN 'Fall 2010 Correspondence' ELSE
IF (SECTION_NO EQ '81' AND SEM EQ '1') THEN 'Spring 2011 Correspondence' ELSE
IF SECTION_NO EQ '80' THEN 'Year Long Correspondence' ELSE J0.CSQASC_TERM_VAL_TBL.DESCR||(' '| SESSION);
TITLE/A60='"'||CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SUBJECT | CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CATALOG_NBR |' '| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION ||'-'|| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE ||'-'|| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.DESCR||'"';
DESC/A29='"'||CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SUBJECT | CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CATALOG_NBR |' '| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CLASS_SECTION ||'-'|| CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SESSION_CODE||'"';
PUBLISH/A1='0';
TEMPLATE/A25=
IF SECTION_NO EQ '79' OR '89' OR '99' THEN 'template.online' ELSE
IF SECTION_NO EQ '80' THEN 'template.corr.yearlong' ELSE
IF SECTION_NO EQ '81' THEN 'template.corr.semester' ELSE 'template.webenhanced';
CALL_NO_SEQ/A5=EDIT ( J4.CSQASC_CLASS_NOTES.DESCRLONG, '99999$*');
SITE_ID_2/A11=CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM||'.'|| CALL_NO_SEQ;
END
TABLE FILE CSQASC_CLASS_TBL
PRINT 
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM'
     'J0.CSQASC_TERM_VAL_TBL.TERM'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.SITE_ID_1'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.CALL_NO_CLASS'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.START_DT'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.TITLE'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.COURSE_ID'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.DESCR'
     PUBLISH
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.END_DT'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.TEMPLATE'
HEADING
""
FOOTING
""
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.INSTITUTION EQ 'CSC01';
-*WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM EQ &STRM.(OR(FIND CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM,CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM IN csqasc_class_tbl)).Select term.;
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM EQ '1108'
WHERE J4.CSQASC_CLASS_NOTES.CLASS_NOTE_NBR EQ '0025';
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE HOLD AS SACRS FORMAT FOCUS INDEX 'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.COURSE_ID' 

TABLE FILE CSQASC_CLASS_TBL
PRINT 
     'J0.CSQASC_TERM_VAL_TBL.TERM'
     'J4.CSQASC_CLASS_NOTES.SITE_ID_2'
	 'J4.CSQASC_CLASS_NOTES.CLASS_NOTE_NBR'
	 'J4.CSQASC_CLASS_NOTES.CLASS_NOTES_SEQ'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.START_DT'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.TITLE'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.COURSE_ID'
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.DESCR'
     PUBLISH
     'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.END_DT'
HEADING
""
FOOTING
""
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.INSTITUTION EQ 'CSC01';
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM EQ '1108'
WHERE ( J4.CSQASC_CLASS_NOTES.CLASS_NOTE_NBR EQ ' ' ) AND ( J4.CSQASC_CLASS_NOTES.CLASS_NOTES_SEQ EQ 20 );
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE HOLD AS SEQCRS FORMAT FOCUS INDEX 'CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.COURSE_ID'
JOIN
 LEFT_OUTER SACRS.SEG01.COURSE_ID IN SACRS TO MULTIPLE SEQCRS.SEG01.COURSE_ID
 IN SEQCRS TAG J1 AS J1
 END
DEFINE FILE SACRS
SITE_ID/A11=IF ( J1.SEG01.CLASS_NOTE_NBR EQ ' ' AND J1.SEG01.CLASS_NOTES_SEQ EQ 20) THEN J1.SEG01.SITE_ID_2 ELSE SACRS.SEG01.SITE_ID_1;
-*SITE_ID/A11=IF SITE_ID_2 EQ ' ' THEN SITE_ID_1 ELSE SITE_ID_2;
END
TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'J1.SEG01.SITE_ID'
     'SACRS.SEG01.SITE_ID_1'
     'J1.SEG01.SITE_ID_2'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE'
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML   


Here is what I get......The correct number of records but not doing the define correctly in my last file.

TERM SITE_ID SITE_ID_1 SITE_ID_2 Start Date TITLE COURSE_ID Descr PUBLISH End Date TEMPLATE 
Fall 2010 1108.10999 1108.12619 1108.10999 2010/08/23 "PSYC 433 0080-1-ABNORMAL PSYCHOLOGY" PSYC 433 0080-1 ABNORMAL PSYCHOLOGY 0 2010/12/17 template.webenhanced 
Fall 2010   1108.12665   2010/08/23 "MATH 232 0081-1-APPLIED STATISTICS" MATH 232 0081-1 APPLIED STATISTICS 0 2010/12/17 template.webenhanced 
Fall 2010 1108.10549 1108.12318 1108.10549 2010/08/23 "HIST 231 0080-1-US HISTORY TO 1877" HIST 231 0080-1 US HISTORY TO 1877 0 2010/12/17 template.webenhanced 
Fall 2010 2nd 8 Weeks 1108.22184 1108.12184 1108.22184 2010/10/25 "BA 241 79B1-8W2-QUANTITATIVE METHODS" BA 241 79B1-8W2 QUANTITATIVE METHODS 0 2010/12/17 template.online 
Fall 2010 1st 8 Weeks   1108.11613   2010/08/23 "ACTG 241 79A1-8W1-ACCOUNTING PRINCIPLES I" ACTG 241 79A1-8W1 ACCOUNTING PRINCIPLES I 0 2010/10/15 template.online 
  


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Platinum Member
posted Hide Post
Sorry it didn't format it right in the output part....I put it in the tags Frowner


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
Try changing your final TABLE request to this:

TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'SITE_ID'
     'SACRS.SEG01.SITE_ID_1'
     'J1.SEG01.SITE_ID_2'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE'
.
.
.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
When I try that it keeps switching it....

DEFINE FILE SACRS
SITE_ID/A11=IF SITE_ID_2 EQ ' 'THEN SITE_ID_1 ELSE SITE_ID_2;
END
TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'SACRS.SEG01.SITE_ID_1'
     'SACRS.SEG01.SITE_ID_1'
     'J1.SEG01.SITE_ID_2'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE'  


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
Then try changing the DEFINE name, so it cannot be confused with the two real columns:

DEFINE FILE SACRS
 SITE_IDX/A11=IF SITE_ID_2 EQ ' 'THEN SITE_ID_1 ELSE SITE_ID_2;
END
-*
TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'SITE_IDX'
     'SACRS.SEG01.SITE_ID_1'
     'J1.SEG01.SITE_ID_2'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE'


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
Still no luck....I have tried several different ways of arranging all my defines. I think the problem is that my site_id_2 (which is the one I want if there is actually a value in it) doesn't actually have a blank column. I tried ' ', 'null', 'blank'......and it still always pulls the site_id_2.

malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
'null' and 'blank' are just constant string values that have no specific meaning in WF other than the 'null' or 'blank' values themselves. Did you try MISSING?

If you're attempting to read a field in a cross-referenced table which is included there as an result of an outer join then it is possible that, if there are no matching records in the "referenced" table, all of its fields in that particular instance will have a NULL value which in WF is treated as MISSING.

Syntax:
IF MY_FIELD [IS | IS NOT] MISSING THEN ...



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Would using SET ALL=ON or PASS do the same thing?


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Platinum Member
posted Hide Post
I tried both the missing and the set all commands and am still not getting it.

JOIN
 LEFT_OUTER SACRS.SEG01.COURSE_ID IN SACRS TO MULTIPLE SEQCRS.SEG01.COURSE_ID
 IN SEQCRS TAG J1 AS J1
 END
DEFINE FILE SACRS
SITE_ID_CLASS/A11=SACRS.SEG01.STRM ||'.'||CALL_NO_CLASS;
SITE_ID_SEQ/A11=J1.SEG01.STRM ||'.'|| CALL_NO_SEQ;
SITE_IDX/A11=IF SITE_ID_SEQ IS MISSING THEN SITE_ID_CLASS ELSE SITE_ID_SEQ;
END
TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'J1.SEG01.SITE_IDX'
     'SACRS.SEG01.SITE_ID_CLASS'
     'J1.SEG01.SITE_ID_SEQ'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE'  


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
You'd need to evaluate for MISSING on fields you're reading from the database, not on virtual fields you are creating in the DEFINE block.

Evaluate J1.SEG01.STRM and see what you'll get.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Platinum Member
posted Hide Post
Seem to still get the same result:

SET ALL = PASS
JOIN
 LEFT_OUTER SACRS.SEG01.COURSE_ID IN SACRS TO MULTIPLE SEQCRS.SEG01.COURSE_ID
 IN SEQCRS TAG J1 AS J1
 END
DEFINE FILE SACRS
SITE_ID_CLASS/A11=SACRS.SEG01.STRM ||'.'||CALL_NO_CLASS;
SITE_ID_SEQ/A11=J1.SEG01.STRM ||'.'|| CALL_NO_SEQ;
SITE_IDX/A11=IF J1.SEG01.STRM IS MISSING THEN SITE_ID_CLASS ELSE SITE_ID_SEQ;
END
TABLE FILE SACRS
PRINT 
     'SACRS.SEG01.TERM'
     'J1.SEG01.SITE_IDX'
     'SACRS.SEG01.SITE_ID_CLASS'
     'J1.SEG01.SITE_ID_SEQ'
     'SACRS.SEG01.START_DT'
     'SACRS.SEG01.TITLE'
     'SACRS.SEG01.COURSE_ID'
     'SACRS.SEG01.DESCR'
     'SACRS.SEG01.PUBLISH'
     'SACRS.SEG01.END_DT'
     'SACRS.SEG01.TEMPLATE' 


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
quote:
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM EQ '1108'
WHERE CSQASC_CLASS_TBL.CSQASC_CLASS_TBL.STRM EQ '1108'

SITE_IDX/A11=IF J1.SEG01.STRM IS MISSING THEN SITE_ID_CLASS ELSE SITE_ID_SEQ;

Based on the WHERE clauses (above) you have for your two extracts, field J1.SEG01.STRM in the DEFINE above for SITE_IDX will never be missing because it will always have a value of '1108'.

Previously, you were using the DEFINEs below. In this case DEFINEd field SITE_ID_SEQ will never be missing because if will always have a period (.) at the very least.
quote:
SITE_ID_CLASS/A11=SACRS.SEG01.STRM ||'.'||CALL_NO_CLASS;
SITE_ID_SEQ/A11=J1.SEG01.STRM ||'.'|| CALL_NO_SEQ;
SITE_IDX/A11=IF SITE_ID_SEQ IS MISSING THEN SITE_ID_CLASS ELSE SITE_ID_SEQ;


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
I was able to get it to work in taking my final table request and putting that into a hold file, not printing the site_id. Then I table filed that hold file, did the define for the site_id=if site_id_seq eq ' ' then site_id_class else site_id_seq. That output like I needed. I think in my second hold file where I was pulling the note nbr=' ' and seq=20 that was only pulling those so when I joined it to my first hold file there was no site_id_seq in my first hold file so it didn't have a value at all, not even blank. So I had to create another hold file to create the blank value and then everything worked. Does this even make sense? Completely different logic than mainframe focus.

Malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Platinum Member
posted Hide Post
The more I think about this, logically, it kinda makes sense but it sure seems odd to me that you would have to put it all in a hold file just to generate the blank value. Just not what I am used to with mainframe focus I guess.


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
Unless you SET HOLDMISS = ON, WF will convert missing values from relational tables to blanks (for text values) and zeroes (for numeric vslues) in WF hold files.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
So maybe instead of doing the extra hold file, before my final table request include the set holdmiss = on to see if that could make my define work?

malinda


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Forcing all rows to print

Copyright © 1996-2020 Information Builders