Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    custom line count (field = last field + 1) doesn't work in Data Mig ?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
custom line count (field = last field + 1) doesn't work in Data Mig ?
 Login/Join
 
Silver Member
posted
I'm looking for a way to create a line (within invoice) counter and using a way that works in webFOCUS.

In my transformation, I have the following code for an integer field called LINE_KEY:

IF (HEADER_KEY EQ LAST HEADER_KEY)
THEN (LAST LINE_KEY + 1)
ELSE 1

In the expression calculator is says the expression is valid. If I check the sample data within the calculator it says it cannot find field named LINE_KEY.

Is there another way to achieve this?

I am using DM iway server 7.6.10 on windows server 2003.


wf 767 running on w2k3 srvr
 
Posts: 46 | Registered: September 22, 2006Report This Post
Virtuoso
posted Hide Post
The LAST function really applies to the internal matrix in TABLE requests only. SQL does not recognize it; MODIFY inactivates work area field values after a record is added/updated/deleted, so values from previous records would not be available during processing for the current record. (MODIFY does provide a means for preserving values from the previous record, but this functionality is not part of DataMigrator.) You could try creating a new column in the "Select Columns" section (although the data will need to be sorted correctly) or you may need to create a preprocessing step prior to the Data Flow.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Master
posted Hide Post
quote:
The LAST function really applies to the internal matrix in TABLE requests only.


I'm positive that is incorrect. If I have pre-sorted data (i.e. temp file that Oracle has already sorted), LAST works just fine with TABLEF and TABLEF does not use the internal matrix.

I don't use Data Migrator, but normal FOCUS syntax would have a ";" after the ELSE 1.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Platinum Member
posted Hide Post
Can you go into the text view of the data flow and send us the code?


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
 
Posts: 126 | Registered: January 18, 2007Report This Post
Guru
posted Hide Post
I think you've got one too many LAST there. Please try:

LINE_KEY / I5 =

IF (HEADER_KEY EQ LAST HEADER_KEY) THEN LINE_KEY + 1 ELSE 1

Note that while numeric columns are self-initialized as zero the validate syntax check doesn't know that so it won't pass a syntax check but it will still work.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    custom line count (field = last field + 1) doesn't work in Data Mig ?

Copyright © 1996-2020 Information Builders