Trying to use the read function to read a record from a file and use it as a parameter. There is one line in the file and it is 6 characters long. I also tried using a ( RECL 80 RECFM V spec on the FILEDEF, but no go. Here is what I have.
FILEDEF TERM DISK /export/home/issjy/data/term.ftm
-READ TERM &TERM1.A6.
TABLE FILE MYTABLE
IF COLUMN3 EQ &TERM1
ON TABLE HOLD AS MYTERMSTUFF FORMAT ALPHA
Looks simple but I'm list here
What OS are you on? I assume it's UNIX. Is your path correct?
Add a -RUN after the FILEDEF. FILEDEF will not execute before the -READ beacuse all Dialogue Manager commands execute before non Dialogue manager commands, unless a -RUN in encountered.
-TYPE &TERM1to see if the value was successfully read into the variable.
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
If you are trying to filter against a value stored in an external file you can do that without a –READ.
Use IN FILE - Selects records based on values stored in a sequential file.
You still need to filedef the external file.
WHERE COLUMN3 IN FILE TERM;
WF 8 version 8.2.04. Windows.
In focus since 1990.
I would definitely try Francis' suggestion first. That should do the trick. Spence's suggestion would also work and is an easy workaround in case you can't get it to work, but it would not be as efficient. I think it would have to keep reading the external file (TERM) over and over with each record - but I'm not sure of the internall processing WF uses for the IN FILE functionality. Additionally, the selection criteria could not be passed directly to the DBMS because of this, but using the &var it could.
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
You need a
after the FILEDEF, before the -READ.
(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
|Powered by Social Strata|