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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
modify include
 Login/Join
 
Silver Member
posted
Hy!! I must add the instances in DB2 table.

Format field table DB2 (name table is OPMOV)

name field DB2 format master Focus Movim integer I9L
Dt_trade date yymd
Acqvend char(1) A1

I use this instruction:

Define file AAAAA
SN_MOVIMEN /i9l = 7022;
dt_trade /yymd = 20071031:
acqvend /a1 = ‘’;
end
-*
Table file AAAAA
Print SN_MOVIMEN
Dt_trade
acqvend
On table hold as ‘OPINSER’
End
-*
MODIFY FILE OPMOV
FIXFORM SN_MOVIMEN
FIXFORM SD_TRADE
MATCH SN_MOVIMEN
ON NOMATCH INCLUDE
ON MATCH REJECT
DATA ON OPINSER
END

The program adds instances but the output is incorrect :

MOVIMEN TRADE ACQVEND
7022 1901-02-02 2

Thanks for any help!!!
 
Posts: 31 | Location: roma | Registered: August 18, 2005Report This Post
Virtuoso
posted Hide Post
Roby

change this line

dt_trade /yymd = 20071031:

to

dt_trade /yymd = '20071031':

Per favore update your Signature in your users profile so we do not have to ask you what system you are using.

Grazie!




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
the output is always
MOVIMEN TRADE ACQVEND
7022 1901-02-02 2

Frowner
I try also:

dt_trade /A8 = '2007-10-31'
 
Posts: 31 | Location: roma | Registered: August 18, 2005Report This Post
Virtuoso
posted Hide Post
Roby

try this

DEFINE FILE CAR 
SN_MOVIMEN/I9L = 7022;
DT_TRADE/YYMD = '20071031';
ACQVEND/A1 = '';
END
-*
TABLE FILE CAR
PRINT SN_MOVIMEN
DT_TRADE
ACQVEND
BY COUNTRY
-*ON TABLE HOLD AS ‘OPINSER’
END



And tell me if this works.....

Compare my code to yours and see all the differences, like ":" instead of ";" etc




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
Roby,

First: Please update your signature, so we can help yoou better.

Next: you have not included your master file OPMOV, so I can't really be sure of the data formats in that database.
The code below should work.
A few things to note:
- you should really do a HOLD FORMAT ALPHA. If you do a MODIFY with a FIXFORM like you do, the data should be normally readable. Otherwise you could use FOXFORM FROM HOLD, but then all the fields in the HOLD file MUST be present in the MODIFY.
- I had to specify the WITH clauses to be able to print anything. This is because it needs a reference point in the dtaa. If your database AAAA contains the defined fields, you don't need that. Same is valid for the RECORDLIMIT.
- In the MODIFY you should specify how many characters the modify must read for each field in the fixform. This ensures that you always read the correct number of bytes and is just good practice.
- You should especially take care of reading the entire record from your hold file. There are cases where the records will be wrapped around, and that is not desirable.
SET HOLDLIST=PRINTONLY

DEFINE FILE CAR 
SN_MOVIMEN /I9L WITH COUNTRY = 7022;
DT_TRADE /YYMD WITH COUNTRY = '20071031';
ACQVEND /A1 WITH COUNTRY = ' ';
END
-*
TABLE FILE CAR
PRINT SN_MOVIMEN
DT_TRADE
ACQVEND
IF RECORDLIMIT EQ 1
ON TABLE HOLD AS 'OPINSER' FORMAT ALPHA
END
-*
MODIFY FILE OPMOV 
FIXFORM SN_MOVIMEN/9 SD_TRADE/8 ACQVEND/1
MATCH SN_MOVIMEN 
ON NOMATCH INCLUDE 
ON MATCH REJECT 
DATA ON OPINSER 
END

Let me know if this helped in getting the right results.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
the output is correct!! Big Grin
thank you very much!
 
Posts: 31 | Location: roma | Registered: August 18, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders