March 12, 2007, 07:10 AM
SyedPartition
Hi
I am trying to create partitions by going with the following approach:
-Edit the Master File and add the ACCESSFILE attribute.
-Create the Access File using a text editor.
Once the partition is created, is there any way we can query the individual partition and get the data for that particular partition only? If yes, then please let me know how to go about it.
Basically I need to verify whether the partitioning logic which I have implemented works or not.
Any help would be highly appreciated.
Warm Regards
Syed Arij
-*****Using WebFOCUS 7.1.4 through Citrix.
Using WF 7.1.7/Dev Studio
March 12, 2007, 07:30 AM
FrankDutchafter editing the master you will have to give the command
CREATE
and than you can do
CHECK FILE ....
succes
|
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 |
March 12, 2007, 07:40 AM
Danny-SRLSyed,
In the Describing Data With WebFOCUS Language Manual (vers. 7.6) you will see that in order to partition you have to have a WHERE clause which will define the records that go into each partition (page 7-38 and following). Once that is defined, when you have a TABLE request that uses the same WHERE as in the partition definition, FOCUS will access only that partition (page 7-41). It should be totally transparent. After the query you can use the ? STAT command to find out how much I/O has been performed.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 12, 2007, 07:45 AM
SyedHi Frank,
I am using the following code to create the access file for .mas file:
MASTERNAME POC_ACCESS
DATANAME 'FINPART1 FOCUS A'
WHERE LOC_I EQ 553;
LOCATION MORECUST
DATANAME 'MORE553 FOCUS A'
DATANAME 'FINPART2 FOCUS A'
WHERE LOC_I EQ 551;
LOCATION MORECUST
DATANAME 'MORE551 FOCUS A'
After this, when I try to query the .mas file for the source, I am getting the error:
(ACC20203) ACCESS FILE POC_ACCESS ( MASTER @0000000 ) NOT FOUND
BYPASSING TO END OF COMMAND
Please help.
Rgds
Syed
Using WF 7.1.7/Dev Studio
March 12, 2007, 08:09 AM
SyedHi Danny
As mentioned in my last post, I am using the following code to create the access file/partitions:
MASTERNAME POC_ACCESS
DATANAME 'FINPART1 FOCUS A'
WHERE LOC_I EQ 553;
LOCATION MORECUST
DATANAME 'MORE553 FOCUS A'
DATANAME 'FINPART2 FOCUS A'
WHERE LOC_I EQ 551;
LOCATION MORECUST
DATANAME 'MORE551 FOCUS A'
However, I am unable to query the .mas file and get data.
Please help.
Regards
Syed
Using WF 7.1.7/Dev Studio
March 12, 2007, 09:51 AM
Danny-SRLSyed,
1. Did you enter the attribute ACCESSFILE=POC_ACCESS in the master file? (By the way I would limit the name to 8 characters)
2. I see you are on a VM box. Are your access definitions in a file called POC_ACCESS ACCESS fm?
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 12, 2007, 11:49 AM
SyedHi Danny
1. Did you enter the attribute ACCESSFILE=POC_ACCESS in the master file? - Yes I did. However, the filename is more than 8 characters as is mentioned here. I will change the name to less than 8 characters.
2.I see you are on a VM box. Are your access definitions in a file called POC_ACCESS ACCESS fm?- No. I am using POC_ACCESS.ACX file for creating the access file. Also, I did not get what you meant by 'VM box'. Please let me know if this approach is correct or not.
FYI since I am loacated in India, I will not be able to work on your suggestions till tomorrow morning my time! Your help, however, will certainly give me pointers to the correct approach.
Rgds
Syed
Using WF 7.1.7/Dev Studio
March 12, 2007, 11:56 AM
Danny-SRLSyed,
Because you used DATANAME 'FINPART1 FOCUS A', it seemed to me that you were on a VM mainframe machine. So what machine are you using? Windows? Unix?
Regards till tomorrow.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 13, 2007, 02:26 AM
SyedHi Danny
Yes I am working on a mainframe server. Do I need to use .acx file to write the definitions for an access file?
Rgds
Syed
Using WF 7.1.7/Dev Studio
March 13, 2007, 03:20 PM
Danny-SRLSyed,
You are working on a M/F server. Is it MVS? Or VM? Or Linux? What is your file system?
After DATANAME you must put the name of the file as it is on the disk.
I looked in the manuals and I didn't see what should be the name of the ACCESS files if you have a Linux or Windows file system. I suppose it is .acx.
So tell me first what is your file system and then we'll see.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 14, 2007, 02:05 AM
SyedHi Danny,
We are using MVS server.
Actually our intention is to partition the FOCUS file in the WebFOCUS environment.
Here's a snapshot of the .mas file which we are using:
FILE=parttest, SUFFIX=FOC, ACCESS=/usr/lpp/IWAYEPTA/ibi/apps/irs_dev/PARTTEST
SEGNAME=ROOT_SEG, SEGTYPE=S1, $
FIELD=ACCT_DT, ALIAS=ACCT_DT, FORMAT=MDY, PROPERTY=KEY, $
FIELD=YR_I, ALIAS=YR_I, FORMAT=I5, $
FIELD=MO_I, ALIAS=MO_I, FORMAT=I5, $
FIELD=WK_I, ALIAS=WK_I, FORMAT=I5, $
And below is the access file created for the same:
MASTERNAME PARTTEST
DATANAME USER1.PARTTEST1.FOCUS
WHERE MO_I EQ 1 TO 6;
DATANAME USER1.PARTTEST2.FOCUS
WHERE MO_I EQ 7 TO 12;
We want to partition the FOCUS file which would be created for the source data (coming from a DB2 table).
Please suggest a suitable approach for the same.
Regards
Syed
Using WF 7.1.7/Dev Studio
March 14, 2007, 07:03 AM
Alan BSyed
The partitioning of a FOCUS db has to be done with care.
Take an example for a WebFOCUS windows environment, the MFD is as you describe:
FILE=parttest, SUFFIX=FOC, ACCESS=parttest
SEGNAME=ROOT_SEG, SEGTYPE=S1, $
FIELD=ACCT_DT, ALIAS=ACCT_DT, FORMAT=MDY, PROPERTY=KEY, $
FIELD=YR_I, ALIAS=YR_I, FORMAT=I5, $
FIELD=MO_I, ALIAS=MO_I, FORMAT=I5, $
FIELD=WK_I, ALIAS=WK_I, FORMAT=I5, $
As the MFD and ACCESS file are in the same directory, only the name of the ACCESS file needs to be given, or you could you a complete windows path or a APP PATH notation, MYAPP/PARTTEST.
For the access file:
MASTERNAME PARTTEST
DATANAME c:\dir1\dir2\parttest1.foc
WHERE MO_I FROM 1 TO 6;
DATANAME c:\dir1\dir2\parttest1.foc
WHERE MO_I FROM 7 TO 12;
The DATANAME is in the windows format of path and directory. You can also use the APP PATH notation, MYAPP/parttest1.foc.
Now first thing to remember is that partitioning is automatic only for reporting. So to report from this data you have to do nothing more. To load the data you must issue the correct USE statement:
USE
c:\dir1\dir2\parttest1.foc
END
and manually separate the partition values prior to loading the data, MODIFY will ignore the ACCESS file attributes.
Additionally you must also CREATE these partitions separately, again issuing the correct use, CREATE FILE will ignore the ACCESS file attributes.
The same applies to any platform, just ensure you have the naming conventions correct.
Alan.
WF 7.705/8.007
March 16, 2007, 05:54 AM
SyedHi Alan
Your approach work just fine for me. Thanks a lot. I am able to use the feature of partitioning using the steps suggesed by you. You are right- Its the same approach for any environment (its working for MF too).
Regards
Syed
Using WF 7.1.7/Dev Studio