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 all, I've just a problem with a -read command. This command generate a HTTP 500 error. Here's the code : TABLE FILE &P_FICHIER SUM &P_CHAMP NOPRINT COMPUTE DOCID/A12='&P_DOCID'; COMPUTE DESC/A20='&P_DESCRIPTION'; -*COMPUTE NBE/I4 WITH &P_CHAMP=CNT.&P_CHAMP ; &P_SELECTED COMPUTE OPTION_VALUE/A256 = &P_CHAMP ; COMPUTE OPTION_SELECT/A20 = SEL ; COMPUTE OPTION_LIBELLE/A256 = &P_ZONE_LIB1 &P_CONCAT &P_ZONE_LIB2 &P_CONCAT &P_ZONE_LIB3 ; BY &P_CHAMP NOPRINT -*ON TABLE SET HOLDLIST PRINTONLY ON TABLE HOLD AS OPT END -RUN -SET &NBELEM=&LINES; -SET &NUMELEM=0; -MRNOEDIT EX JALLOUE HOLD=LISTBOXE,NIVEAU=W -SET &TRIM = INT(RDUNIF('D12.10') * 1000000) + 1; -SET &RANDOM = 'T1' || &TRIM; -RUN -DYNAM ALLOC FILE &RANDOM - - DSNAME FO.EIDLSI.LSIPROV.&RANDOM - - SPACE 10,10 TRACKS - - RECFM VB LRECL 1076 - - NEW CATLG -RUN -:LECTURE -READ OPT NOCLOSE &Z_DOCID.A12. &Z_DESC.A20. &Z_VALUE.A256. &Z_SELECT.A20. &Z_LIBELLE.A256.
-IF &IORETURN NE 0 THEN GOTO :FIN_LECTURE;
I'm sorry but I don't see anything wrong.
Somebody can help me?
Thank's
WebFocus thru Dev Studio version 7.6.11 Dev Studio on Windows Xp, Webfocus Client on UNIX basing on TOMCAT and DB2, Reporting Server on MVS , USS and on UNIX
Posts: 39 | Location: France | Registered: December 10, 2007
First of all, please uncomment the -*ON TABLE SET HOLDLIST PRINTONLY statement. Then there is one unknown item, &P_SELECTED. I can't tell what;s in there. If you do the printonly, and the &&P_SELECTED is empty or otherwise harmless, then your -READ statement is (almost) correct. Officially you should not include a format in your -READ statement, it should read: -READ OPT NOCLOSE &Z_DOCID.12. &Z_DESC.20. &Z_VALUE.256. &Z_SELECT.20. &Z_LIBELLE.256. Dialog Manager will decide fully automatically if it is a number or alpha variable. The number after the variable is only to indicate dm how many characters to read for this var. It may help to run the procedure with -SET &ECHO='ALL'; included, and withoyt the -READ (if that is indeed the problem). And then also check the holdfile to see if the contents is indeed exactly as you expect it to be.
Hope this helps...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Tom, HOLD FORMAT ALPHA in this case will be of no consequence, since all fields already are alpha. The FILEDEF will take care of the correct reading of the file.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Officially you should not include a format in your -READ statement, it should read: -READ OPT NOCLOSE &Z_DOCID.12. &Z_DESC.20. &Z_VALUE.256. &Z_SELECT.20. &Z_LIBELLE.256. Dialog Manager will decide fully automatically if it is a number or alpha variable. The number after the variable is only to indicate dm how many characters to read for this var.
I must disagree. The syntax used by Philippe is documented.
From a WebFOCUS Developing Applications language manual: Syntax: How to Retrieve a Variable Value From an External File -READ filename[,] [NOCLOSE] &name[.format.][,][&name][.format.]
&name[,] Is the variable name. For free-format files, you may separate the variable names with commas. If the list of variables is longer than one line, end the first line with a comma and begin the next line with a dash followed by a blank. For fixed-format files, including comma-delimited files, begin the next line with a dash, a blank, and a comma.
.format. Is the format of the variable. For a free-format file, you do not have to specify this value, but you may. For a fixed-format file, format is the length or the length and type of the variable (A is the default type). The value of format must be delimited by periods. The format is ignored for comma-delimited files. Note: Instead of using .format., you can specify the length of a variable using -SET and enclosing the corresponding number of blanks in single quotes. For example: -SET &CITY=' '; -SET &CODE1=' '; -SET &CODE2=' ';
What most people forget is that the format can only be A or I. P, D, and F numeric formats are not allowed in DM variables.
From a mainframe language manual: format Is the format of the variable. It may be Alphanumeric (A) or Numeric (I).
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003
But I just found the answer some minutes later. First, it's effectivly the read command which was in error. Second, by using smaller format I bypass the problem. No more than 80 CH per Amper variables !!!!! Welcome back in the CARD READER format Is it a product limitation or a custom parameter ?
WebFocus thru Dev Studio version 7.6.11 Dev Studio on Windows Xp, Webfocus Client on UNIX basing on TOMCAT and DB2, Reporting Server on MVS , USS and on UNIX
Posts: 39 | Location: France | Registered: December 10, 2007
and i'll just mention that there *can* be a difference between HOLD FORMAT ALPHA and just HOLD even when all the fiels are alpha. The masters can be different, different field lengths having to do with half-word boundaries and such things it hurts my brain to have to resurrect...its just worthy of note, useful when tripping over.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
One other point worth mentioning is that if you are not going to be using the held data in a TABLE request, then use ON TABLE SAVE, as you do not have the slight overhead of WF creating the .mas file that you won't be using anyway.
If you are in the habit of NOT naming your hold files, this could also save you some embarassment when you inadvertantly use this in lieu of some other hold file that was meant ot be present!
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, 2004