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.
is there any way to flexibly print with 'OVER' according to a value in a column of a table? eg: -set &overtxt = 'over'; TABLE FILE XXX PRINT COL1 COL2 &overtxt COL3
I want to flexibly change that 'OVER' text to '' depending on the value of another column, say, col5?
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
The simple answer is NO. You cannot mix Dialogue Manager and TABLE in this way.
The complex answer is a question. What do you hope to achieve? Can you show a layout you want based on, say, the CAR file. If we can understand your requirements, then a solution may be possible.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
it is a long story to this and I cannot use the car file as a sample. The basic idea is this: there is this column in this audit table. It is variable length, containing changed info for some other table. It can be for a row add, a row delete, or an row updat row.
For added/deleted row, it starts with add/del status and strings all the column values together with a delimiter. For update row, it starts with upd status and strings with old and new values of the changed (only) columns together with a delimiter. The total possible columns are 86. What we are required to do is: for add/del, we print two columns in one row. For update, we print the changed column in one row with old and new values. So, when I map out the table file print with
print col1 col2 over col3 col4 over col5 col6 over...
the add/del takes up two pages, but the updates will usually have only one page's worth of data (only a few valus changes), leaving the second page blank. So, I want to stop that 'over' after a certain place so that blank can overlay blank and no second blank page generated under 'update'.
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
Mike, Inspite of what others have said, YES you can do it and with DIALOG MANAGER but NOT in the way that you are trying to do it, BUT with one extra step. It will also depend upon the TIME that you have to render the report. i.e. must it render in 5 seconds or 6 seconds
What I do AND I SHALL BE SPEAKING ON THE SUBJECT AT THE SUMMIT, is to create a focexec ON THE FLY, What you do is to Create a focexec that you will call in your main program (SEE FILEDEF below) FILEDEF mydynamicfile DISK C:\ibi\apps\financialreports\mydynamicfile.fex -RUN -SET &MYVARIABLE = 'E07'; This is your variable field (E07) that YOU MENTIONED
NOW FROM THE MAIN PROGRAM DO A
-WRITE MYDYNAMICFILE TABLE FILE XXX -WRITE MYDYNAMICFILE PRINT E01 E02 &MYVARIABLE -WRITE MYDYNAMICFILE END THEN further down in your code you do -INCLUDE MYDYNAMICFILE
Please give that a try and if you need more help contact me at njm870t@hotmail.com sincerest regards SteveThis message has been edited. Last edited by: Stefaans,
Hi Steve: the problem is that the variable value has to depend on the value of a column in the table itself during the TABLE File command. So, the setting of the var value has to done during the TABLE file itself.
I have a stripped-down of the fex below for your reference. I am talking about to variate the 'OVER' text at the last compute statement depending on the DATYPE.
Hey Mike Great to hear from you. Please forgive me if I am missing something.
Indications are that your first character in the record determines the data type. Great. 1) Are all the records of one type say per run? 2) I assume that they are as the overtext is listed once why not table out the record to a save or hold file, then read the file to asceratin the DATYPE. The -SET &MYOVERTEXT = IF DATTYPE EQ 'A' - THEN 'AddaRecord' ELSE - IF.... Then go the route that I suggested in my earlier note. It would be easier if I new exactly what you were trying to do, because I am sure that I have done something similar in past.
If you would like to take this one offline, contact me by email and perhaps we can have a quick chat. regards SteveThis message has been edited. Last edited by: Stefaans,
Mike, Inspite of what others have said, YES you can do it and with DIALOG MANAGER but NOT in the way that you are trying to do it
Please read what I actually said:
quote:
The simple answer is NO. You cannot mix Dialogue Manager and TABLE in this way.
I, and many others here, are aware that a focexec can be created in DM, which is why I asked for a bit more explanation before trying to provide an answer.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I would try a different approach altogether. From the focexec snippet you appear to have a file delimited with a % sign. Look at creating an MFD over it with SUFFIX=DFIX, a delimter of % and taking advantage of the MISSING attribute, using fieldnames such as F1,F2 etc to facilitate the build of the focexec in DM.
Then construct the focexec using a CNTR for each record and use syntax like
ON CNTR SUBFOOT
"<F1 <F2 "
WHEN F2 NE MISSING;
ON CNTR SUBFOOT
"<F3 <F4 "
WHEN F4 NE MISSING;
etc.
The only issues are aligning the subfoot items and getting rid of the line delimiter, but those should be doable.This message has been edited. Last edited by: Alan B,
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Hi Alan: that is an interesting concept. The subfoot trick is worthy of exploring. I need to clarify that it is not a 'file' delimited with a % sign. It is a column in a table delimited with a % sign. It looks a file to you because it is a snippet and I pretty much took out the code to unstring them. So, I am not sure if I need the MFD part. However, before I try it, I would need clarification from you about this:
creating an MFD over it with SUFFIX=DFIX, a delimter of %
what does "SUFFIX=DFIX, a delimter of %" mean? what does it look like actually in code? Thanks in advance.
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
Basically it is a method of reading a non-fixed format file base on a delimiter between each field. It also seems to cope with variable number of fields, or has done in my tests.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Hi Alan: read the link doc. I don't know if I can do a MFD on it. Our current MFD looks like this (simplified): FILENAME=AUDITINFO, SUFFIX=DB2 , $ SEGMENT=AUDITINFO, SEGTYPE=S0, $ FIELDNAME=TBL_CODE, ALIAS=TBL_CODE, USAGE=A2, ACTUAL=A2, $ FIELDNAME=PROCESS_DATE_TIME, ALIAS=PROCESS_DATE_TIME, USAGE=HYYMDm, ACTUAL=HYYMDm, $ FIELDNAME=COL_DATA, ALIAS=COL_DATA, USAGE=A2400V, ACTUAL=A2400V, $
Note the last field, col_data. That is where everything is delimited into and each delimited value can be different format(date, int, etc) and it can be any different combination sequence. I deduct the format of each delimited value by the first two chars during the TABLE FILE command. So, I can't beforehand have a fixed format of definition of the col_data.
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
Perhaps you need to do this in 2 passes of the data then.
You were successfully (I presume) getting the data out.
Can you hold the data delimited (not actually fixed format) from the first run, apply a DFIX master over it, and then run the report to output. How does that sound?
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I am aware of the two pass possibility. I am just hung up on how to do a consistent MFD for the hold file because on the first record, the record layout can be: fld1 char (10) fld2 char (20) fld3 char (20)
but the second record can be fld1 char (16) fld2 char (10) and so forth It all depends on the add/update status and on which column fields the update to the table was done (this is basically an audit trace record). There is no uniform pattern to code a MFD for the hold file.... But... I suppose I can allow for max length and max num of fields though that will substantially increase my hold file size. Maybe performance impact? hummm.. Maybe I can twig it somehow using subfoor without hold file two pass?This message has been edited. Last edited by: mike,
wf 7.6.11 unix aix active reports, HTML, Excel, Text and PDF formats
Declare the field to be the maximum it can be for either record, DFIX will deal with it. The file can have variable length records. Perhaps the name of DFIX is putting you off, there needs to be nothing FIXed about the data file.
FILEDEF MASTER DISK TEST450.MAS
-RUN
-WRITE MASTER FILENAME=TEST450, SUFFIX=DFIX
-WRITE MASTER SEGNAME=TEST450
-WRITE MASTER FIELDNAME=F1 ,ALIAS=F1 ,USAGE=A40 ,ACTUAL=A40 ,$
-WRITE MASTER FIELDNAME=F2 ,ALIAS=F2 ,USAGE=A40 ,ACTUAL=A40 ,MISSING=ON, $
-WRITE MASTER FIELDNAME=F3 ,ALIAS=F3 ,USAGE=A40 ,ACTUAL=A40 ,MISSING=ON, $
-WRITE MASTER FIELDNAME=F4 ,ALIAS=F4 ,USAGE=A40 ,ACTUAL=A40 ,MISSING=ON, $
-WRITE MASTER FIELDNAME=F5 ,ALIAS=F5 ,USAGE=A40 ,ACTUAL=A40 ,MISSING=ON, $
-WRITE MASTER FIELDNAME=F6 ,ALIAS=F6 ,USAGE=A40 ,ACTUAL=A40 ,MISSING=ON, $
-WRITE MASTER FIELDNAME=DELIMITER ,ALIAS='%' ,USAGE=A1 ,ACTUAL=A1 ,$
FILEDEF TEST450 DISK TEST450.DAT
-RUN
-WRITE TEST450 1Lorem ipsum %dolor sit amet,% consectetur adipiscing e%lit, set eiusmod te%mpor incidunt et labore %et dolore magna
-WRITE TEST450 2Plloaso mako nuto u%f cakso do%dtos anr koop a cupy uf cak v%ux noaw yerw phuno
DEFINE FILE TEST450
DATYPE/A1 = SUBSTR(40,F1, 1, 1, 1, DATYPE);
CNTR/I4 WITH F1 = CNTR+1;
END
TABLE FILE TEST450
PRINT DATYPE NOPRINT
BY CNTR NOPRINT
ON CNTR PAGE-BREAK
ON CNTR SUBFOOT
"<F1 =====<F2 "
WHEN F2 NE MISSING;
ON CNTR SUBFOOT
"<F3 =====<F4 "
WHEN F4 NE MISSING;
ON CNTR SUBFOOT
"<F5 =====<F6 "
WHEN F6 NE MISSING;
ON TABLE PCHOLD FORMAT PDF
END
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007