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     [SOLVED]using defined counters for specific instances

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]using defined counters for specific instances
 Login/Join
 
Member
posted
I'm trying to count the number of proficient students and non-proficient students by defining I9 counters and if testing the proficiency fields. If all 4 are "P" the kid is proficient if not, he's non-proficient. I put the value of the counter in the footing, but its always 0. What am I missing

TABLE FILE ASTU_STUDENT
PRINT
'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID'
'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM'
'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME'
'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F'
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F'
'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F'
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F'
COMPUTE PROF_STD/I9 = IF 'SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P' THEN 1 ELSE 0;
BY 'ASTU_STUDENT.ASTU_STUDENT.GRADE'
BY 'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME'
HEADING
"Proficiency Report for Full-Time Students at AIS"
"by Grade and Student Last Name"
" "
" "
FOOTING
" "
ON TABLE SUBFOOT
"TOTAL PROFICIENT STUDENTS WHERE ( ASTU_STUDENT.ASTU_STUDENT.SCHOOLNUM EQ '879' )

This message has been edited. Last edited by: MARYC,


WebFOCUS 7.6.8
ORACLE
 
Posts: 5 | Registered: January 05, 2011Report This Post
Platinum Member
posted Hide Post
Are you looking for something like this:
 TABLE FILE COURSE
PRINT 
     COURSE.CRSELIST.COURSECODE
     COURSE.CRSELIST.CTITLE
     COURSE.CRSELIST.TUITION
     COURSE.CRSELIST.DURATION
     COMPUTE Count_3_and_4/I5 = IF COURSE.CRSELIST.DURATION EQ '3' AND COURSE.CRSELIST.TUITION LT 3000 THEN  1 ELSE  0;
ON TABLE SUBFOOT
""
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE COLUMN-TOTAL AS 'TOTAL' Count_3_and_4
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END 


COURSECODE CTITLE TUITION DURATION Count_3_and_4 
AMA130 HOW TO WRITE USERS MANUAL 1,030.00 3 1 
AMA680 BUSINESS TO BUSINESS MKTG STRATEGY 2,160.00 4 0 
AMA800 INTERVIEWING: A STRATEGIC APPROACH 900.00 3 1 
BIT420 EXECUTIVE COMMUNICATION 2,600.00 6 0 
BIT640 NEGOT AND ADMIN THE LABOR CONTRACT 2,600.00 6 0 
BIT650 IMPROVING INTERNAL CONSULTING SKILL 1,030.00 3 1 
EDP090 DELEGATION AND TEAM EFFORT. 1,500.00 3 1 
EDP130 STRUCTURED SYS ANALYSIS WKSHP 1,200.00 5 0 
EDP390 EFFECTIVE MANAGERIAL COUNSELING 900.00 3 1 
EDP690 APPLIED METHODS IN MKTG RESEARCH 2,250.00 5 0 
EDP750 STRATEGIC MARKETING PLANNING 2,600.00 5 0 
MC230 INTRO TO SYSTEM ANALYSIS 1,110.00 4 0 
MC90 MANAGING DISTRIBUTOR SALE NETWORK 1,030.00 3 1 
NAMA40 PLANNING & DEVELOPING PRODUCTS 1,150.00 4 0 
NAMA730 EFFECTIVE SALES MANAGEMENT 1,900.00 3 1 
NAMA930 CORPORATE FINANCIAL MANAGEMENT 2,100.00 5 0 
PDR330 CHANGING ROLE OF EX SEC & ADM ASST 915.00 3 1 
PDR740 STRATEGIES IN SALES MANAGEMENT 1,900.00 3 1 
PDR870 INSTRUCTIONAL DEVELOPMENT WORKSHOP 2,070.00 5 0 
PU168 FUNDAMNETALS OF MKTG COMMUNICATIONS 1,100.00 4 0 
PU440 GAINING COMPETITIVE ADVANTAGE 1,600.00 4 0 
SFC280 FUND OF ACCTG FOR SECRETARIES 850.00 2 0 
SSI220 FIELD MANAGEMENT OF SALESPEOPLE 1,100.00 4 0 
SSI670 APPLIED PRODUCT/MARKET MANAGEMENT 2,600.00 5 0 
SU620 HOW TO WIN ARBITRATION CASES 800.00 2 0 
UMI710 MKTG FOR THE NON-MKTG MANAGER 1,500.00 3 1 
UMI720 SUCCESSFUL PRODUCT INNOVATION 2,600.00 5 0 
UNI620 PRINCIPLES OF PROFESSIONAL SELLING 1,100.00 4 0 
UNI780 ORGANIZATIONAL CAREER DEVELOPMENT 2,600.00 5 0 
TOTAL 
        10 
          
  
 
          
  


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Member
posted Hide Post
No, I'm checking flags on the students record that indicate whether or not he has passed the prof tests. If they are all on I want to count him as 'proficient'. I also have to count the students who are non-proficient in all 4 categories, so once I figure out how to count one, I can count the others.


WebFOCUS 7.6.8
ORACLE
 
Posts: 5 | Registered: January 05, 2011Report This Post
Expert
posted Hide Post
Perhaps if you added ST. to the field in the footing ?



Also when you post code, please put it in the code tags.
[CODE]
[/CODE]


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
OK Let's try this again

[TABLE FILE ASTU_STUDENT
PRINT
'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID'
'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM'
'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME'
'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F'
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F'
'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F'
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F']

this is the part that doesn't seem to work


[
COMPUTE PROF_STD/I9 = IF ('SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0; NOPRINT
]



BY 'ASTU_STUDENT.ASTU_STUDENT.GRADE'
BY 'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME'
HEADING
"Proficiency Report for Full-Time Students at AIS"
"by Grade and Student Last Name"
" "
" "
FOOTING
"TOTAL PROFICIENT STUDENTS

[
WHERE ( ASTU_STUDENT.ASTU_STUDENT.SCHOOLNUM EQ '879' ) AND
( ASTU_STUDENT.ASTU_STUDENT.CCSDSTATUS NE 'A' OR 'G' OR 'I' OR 'N' ) AND
( ASTU_STUDENT.ASTU_STUDENT.ENTERCODE NE 'CR' OR 'E4' OR 'E5' OR 'E6' );
ON TABLE SET PAGE-NUM OFF ]


WebFOCUS 7.6.8
ORACLE
 
Posts: 5 | Registered: January 05, 2011Report This Post
Guru
posted Hide Post
Do you have more than one "schoolnum" or is this report limited to a selected "schoolnum"?


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Member
posted Hide Post
Just the one school


WebFOCUS 7.6.8
ORACLE
 
Posts: 5 | Registered: January 05, 2011Report This Post
Master
posted Hide Post
Isn't it just simpler to do this as a DEFINE?


DEFINE FILE ASTU_STUDENT
PROF_STD/I9 = IF ('SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' AND 
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' AND
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0;
END

Or even:

DEFINE FILE ASTU_STUDENT
PROF_READING/I9 = IF 'SPROF_SCORES.SPROF_SCORES.READING_PF' EQ 'P' THEN 1 ELSE 0;
PROF_WRITING/I9 = IF 'SPROF_SCORES.SPROF_SCORES.WRITING_PF' EQ 'P' THEN 1 ELSE 0;
PROF_MATH/I9 = IF 'SPROF_SCORES.SPROF_SCORES.MATH_PF' EQ 'P' THEN 1 ELSE 0;
PROF_SCIENCE/I9 = IF 'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' EQ 'P') THEN 1 ELSE 0;
PROFICIENT/I1 = IF PROF_READING + PROF_WRITING + PROF_MATH + PROF_SCIENCE EQ 4 THEN 1 ELSE 0
END

... Then just use PROFICIENT as your test.  You could easily expand this a wee bit to indicate those who are proficient on one area but not others.

This message has been edited. Last edited by: George Patton,


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Guru
posted Hide Post
After your final sort is completed hold data as "FDATA" and add the following code

DEFINE FILE FDATA
PROF_STAT/I9 = IF READING_PF||WRITING_PF||MATH_PF||SCIENCE_PF EQ 'PPPP' THEN 1 ELSE 0;
NUMPROF/I9 = LAST NUMPROF + PROF_STAT;
END
-*
TABLE FILE FDATA
PRINT 
'ASTU_STUDENT.ASTU_STUDENT.GRADE'
'ASTU_STUDENT.ASTU_STUDENT.CCSDFULLNAME' AS 'NAME'
'ASTU_STUDENT.ASTU_STUDENT.PERMNUM' AS 'STD ID'
'ASTU_STUDENT.ASTU_STUDENT.COUNSELOR' AS 'TEAM'
'ATCH_TEACHER.ATCH_TEACHER.LASTNAME' AS 'TEACHER,LAST NAME'
'SPROF_SCORES.SPROF_SCORES.READING_PF' AS 'READING P/F'
'SPROF_SCORES.SPROF_SCORES.WRITING_PF' AS 'WRITING P/F'
'SPROF_SCORES.SPROF_SCORES.MATH_PF' AS 'MATH P/F'
'SPROF_SCORES.SPROF_SCORES.SCIENCE_PF' AS 'SCIENCE P/F'
HEADING
"Proficiency Report for Full-Time Students at AIS"
"by Grade and Student Last Name"
" "
" "
FOOTING
"TOTAL PROFICIENT STUDENTS : <LST.NUMPROF"
END


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Guru
posted Hide Post
Just out of curiosity, why do you have tick marks (') around your field names?


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Virtuoso
posted Hide Post
Those are being generated by DevStudio nowadays. You always get fully qualified fieldnames and they come with the tick marks.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Guru
posted Hide Post
That would explain why I don't see them.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Expert
posted Hide Post
Those are being generated by the GUI. They don't appear when you code via the Text Editor...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
OK, I've got it working now.


WebFOCUS 7.6.8
ORACLE
 
Posts: 5 | Registered: January 05, 2011Report This Post
Expert
posted Hide Post
Your solution might help others in the future. Please post the code or an explanation.

Cheers,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]using defined counters for specific instances

Copyright © 1996-2020 Information Builders