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.
Hi Everybody, I am trying to develop as FOCEXEC to create multiple M/F files. But when I try to execute the process via Report caster, I am facing problems. I used two methods, explained as follows: 1) Using -REPEAT Here, I get the error as "CONTROL LINE NOT RECOGNIZED" The log says,
-SET &REPEAT = 7 ; CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -REPEAT TEST &REPEAT TIMES Task error: CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -REPEAT TEST &REPEAT TIMES
2) Using GOTO Here, as soon as the process reaches the read statement, it terminates without showing any error. READ statement is as follows: -READ NOCLOSE &field_name.A4.
The log says, NOCLOSE &field_name.A4. Task finished.
Please note that the process(with both the methods) works fine when run directly in Managed Reporting.This message has been edited. Last edited by: Kerry,
I have found many times that code working in MRE does not work in RC, so I'm not too surprised about that. Just a matter of finding out what is causing the problem and fixing or working around it.
First error, check your labels (TEST)to make sure they are correct and not duplicated. Also make sure that there aren't items previous to that code that might cause issues.
Second error, you mention GOTO but I don't see what that has to do with the problem. In the -READ statement, you have to specify the ddname (filename) that is being read and I don't see that in your statement.
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, 2007
DYNAM ALLOC FILE &QUAL3 DA &DATANAME - UNIT parameter SPACE parameter CATLG
DEFINE FILE PQR ------- ------- END
TABLE FILE PQR ------- ------- ON TABLE SET STYLE * ------- ------- ENDSTYLE ON TABLE SAVE AS &QUAL3 FORMAT EXL2K
END
-IF &LINES GT 0 GOTO :CONTIT ;
DYNAM DELETE &QUAL3
-GOTO :NEXTLOOP
-:CONTIT ------ ------ -GOTO :NEXTLOOP
-:NEXTLOOP ------ ------ -TEST -RUN -EXIT
For GOTO method: Sorry, I missed to provide the correct log about GOTO. Log: -READ HOLD1 NOCLOSE &field_name.A4. HOLD1 NOCLOSE &field_name.A4. Task finished.
Code looks like follows:
-SET &I = 1 ; -------- -------- TABLE FILE ABC ----- ----- ON TABLE HOLD AS HOLD1 END -RUN
First, try putting a -SET &ECHO=ALL; at the beginning. This will echo back all of the code and you'll be able to see if your lops and branches are working correctly.
Second, usually when creating a hold file that I later -READ, I use ON TABLE HOLD FORMAT ALPHA. Solves problems with being able to read the hold file correctly.
Third, maybe a different -REPEAT would simplify things. Something like
-REPEAT TEST FOR &I FROM 1 TO &REPEATThis message has been edited. Last edited by: Darin Lee,
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, 2007
REPEAT is a reserved word, so you might try changing the name of your variable to &REPEATS or &REPEATX. Also, you appear to be missing a -RUN after the query that creates the EXL2K file, and also after the DYNAM DELETE command. ON TABLE HOLD AS HOLD1 generates a master for file HOLD1, which appears to be unnecessary. ON TABLE SAVE AS HOLD1 avoids creation of the master for each repeat loop and also creates an alpha formatted file (similar to Darin's ON TABLE HOLD FORMAT ALPHA). Darin's suggestion of turning on &ECHO so you see what is happening is a great idea.This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Thanks Dan and Darin! After getting tired to make it run as a whole, I tried to run the report in small chunks. I think I located where the actual problem is, but don't know the solution. I would appreciate if you can have a look at this (tried simulating from the previous posts in the forum).
What error message(s) do you receive when you run it from ReportCaster? You don't need to use the FORMAT ALPHA option with ON TABLE SAVE. Alpha output is automatically generated by ON TABLE SAVE. Also, I don't see a DYNAM ALLOC for the master file description that corresponds to file XYZ.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Hi Dan. I have removed "FORMAT ALPHA" from the code. I am not receiving any error message. The moment HOLD1 file is read, the execution terminates saying "Task finished". I have provided the "DYNAM ALLOC" statement for the XYZ file. DYNAM ALLOC FILE XYZ DA ABC.PQR SHR REUSE -RUN
Actual task log is below:
-READ HOLD1 NOCLOSE &fldname.A4. HOLD1 NOCLOSE &fldname.A4. Task finished. No report to distribute.
That's because there is nothing in your code to create an output report. All you're doing is creating a bunch of HOLD/SAVE files. Report Caster is looking for a report in one of the output formats to send somewhere. If there are none, it says "Task finished. No report to distribute." With the code you have, that would be correct.
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, 2007
Sorry for the late response. Darin, I agree that there is no report, but atleast my loop should have executed to display the values (-TYPE command was used).
@Francis - I added the code but no change.
Now, I am directly using the file (using DDNAME in READ command) to display fldname values, and get the following error: CONTROL LINE NOT RECOGNIZED IN FOCEXEC: -READ XYZ NOCLOSE &fldname.A4
Master file is as follows: FILENAME=XYZ, SUFFIX=FIX, $ SEGNAME=SEGONE, $ FIELD=fldname , , A0004, A0004, $ -----> this ontains the required data FIELD=FILLER1 , , A0001, A0001, $ -----> comma FIELD=dummy field , , A2495, A2495, $ -----> field2
I think the comma should not be a problem as long as I am using SUFFIX as FIX. Thanks!
The only place where you would see the results of a -TYPE would be in the ReportCaster log (or an email if set to email always.
Also, -READ has nothing to do with a master file. The MFD is only used for a TABLE request (an in conjunction with a DYNAM ALLOC/FILEDEF to tell it where the associated flat data file is.)
-READ also requires the file to be allocated, but does not use a MFD, so I don't know why you have included that.
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, 2007
I am looking for the results in ReportCaster log and email both. There, after getting to the first READ, the program terminates.
I didn't know about the MFD not required for -READ. Thanks!
But my output should not be affected, right? I should be able to see whatever I have given in TYPE.
Anyways, I tried executing the code after giving some other name to DDNAME of the flat file and the same problem persists (i.e. works with MRE but not with ReportCaster). I am just trying to see the contents of a flat file till the end of file is reached, by submitting the code via ReportCaster.