I am relatively new to WebFocus and am trying to write a report utilizing multiple joins from mainframe datasets through the EDA relational gateway. My synonyms are set up correctly and my initial join is performed fine. When I use the report painter to count a specified field by userid the function works intermittently.
Using the following code results in data being returned correctly:
TABLE FILE MAF203
COUNT *
BY USERID
HEADING
"PAGE <TABPAGENO "
WHERE ( ACTIVITYTYPE EQ '4' )
AND ( CHANGEDFIELD EQ '12' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
END
However, when I use the same code removing the * with a fieldname I receive an error.
TABLE FILE MAF203
COUNT ACCTNUM
BY USERID
HEADING
"PAGE <TABPAGENO "
WHERE ( ACTIVITYTYPE EQ '4' )
AND ( CHANGEDFIELD EQ '12' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
END
The error I receive is :
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: CNT.USRUSERID
A word which is assumed to be the name of a data field does not appear on the list of names or aliases for the file. Check the spelling of the fieldname.
(FOC009) INCOMPLETE REQUEST STATEMENT
The request statement is terminated with an END, RUN, semicolon (
, or end-of-file before the request is complete.
Why would I receive an error using the same exact code except for one word, when counting every field works? I receive the same errors utilizing the SUM CNT.ACCTNUM BY USERID syntax as well.
Any help would be greatly appreciated.
Thanks!!
ehagan
Using the following code results in data being returned correctly:
TABLE FILE MAF203
COUNT *
BY USERID
HEADING
"PAGE <TABPAGENO "
WHERE ( ACTIVITYTYPE EQ '4' )
AND ( CHANGEDFIELD EQ '12' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
END
However, when I use the same code removing the * with a fieldname I receive an error.
TABLE FILE MAF203
COUNT ACCTNUM
BY USERID
HEADING
"PAGE <TABPAGENO "
WHERE ( ACTIVITYTYPE EQ '4' )
AND ( CHANGEDFIELD EQ '12' );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
END
The error I receive is :
(FOC003) THE FIELDNAME IS NOT RECOGNIZED: CNT.USRUSERID
A word which is assumed to be the name of a data field does not appear on the list of names or aliases for the file. Check the spelling of the fieldname.
(FOC009) INCOMPLETE REQUEST STATEMENT
The request statement is terminated with an END, RUN, semicolon (
Why would I receive an error using the same exact code except for one word, when counting every field works? I receive the same errors utilizing the SUM CNT.ACCTNUM BY USERID syntax as well.
Any help would be greatly appreciated.
Thanks!!
ehagan