Focal Point
[SOLVED] Creating/Using Two Different MFD's on One SAVB File

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/900100572

October 23, 2009, 12:11 PM
Craig R.
[SOLVED] Creating/Using Two Different MFD's on One SAVB File
I am creating a SAVB file that I need to process two different ways in the same procedure (i.e., I need to create "on the fly" and apply two different file descriptions). The first MFD needs to describe the data to take advantage of the OCCURS= and ALIAS=ORDER provisions in WF. Following three TABLE FILEs using this MFD, I need to change the way I'm looking at the data (without the OCCURS=, etc.) and run one more TABLE FILE to complete the requirements for this procedure.

I'm successfully creating the first MFD and am running the three TABLE FILEs; however, I can't seem to get the final TABLE FILE to work using the second MFD.

If someone experienced with this technique could provide some guidance, I'd appreciate it. It's likely that I'm simply not following the right steps.

Thanks!

Craig

This message has been edited. Last edited by: Kerry,


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
October 23, 2009, 12:57 PM
Tom Flynn
Craig,

Create the second MFD and place into IBISAMP.
Then, after executiion with the OCCURS MFD, and I assume, HOLDing the 3 temp files, issue:

APP PREPENDPATH IBISAMP
-RUN
Then continue and the new MFD will come into play...

OR

Dynamically create the new master on the fly, as Waz details here

hth


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
October 26, 2009, 07:25 AM
Danny-SRL
Craig,

If the file you are creating is not too big (for you to decide), you could do something like the following:
  
TABLE FILE file
some code here
ON TABLE SAVB AS CRAIG1
END
SAVB AS CRAIG2

You would now have 2 copies of the SAVB file and can use 2 MFDs, one for CRAIG1 and the other for CRAIG2.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

October 26, 2009, 08:49 AM
Craig R.
My thanks to both of you for responding. I'll give each suggestion a try.

Tom:

EDAPUT... I'll impress my fellow developers here with knowledge of that one!

Daniel:

Never knew you could do something like that (SAVB) outside the "boundary" of a TABLE FILE!

Regards,

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
October 26, 2009, 09:14 AM
Danny-SRL
quote:
Never knew you could do something like that (SAVB) outside the "boundary" of a TABLE FILE!


Oh yes. Very useful. And it works with HOLD and SAVE too. These files are generated from the internal matrix.

One thing though: you can only issue these commands after a TABLE but not a TABLEF because TABLEF does not create an internal matrix.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

October 26, 2009, 10:48 AM
Francis Mariani
SET HOLDLIST=PRINTONLY
SET HOLDFORMAT=ALPHA

FILEDEF S001A DISK S001.TXT

TABLE FILE CAR
SUM 
WEIGHT/D6
HEIGHT/D6
LENGTH/D6
WHEELBASE/D6
BY COUNTRY
ON TABLE SAVE AS S001A
END
-RUN

TABLE FILE S001A
PRINT *
END

FILEDEF S001A CLEAR
FILEDEF S001B DISK S001.TXT

TABLE FILE S001B
PRINT DIMENSION
BY COUNTRY
END

s001a.mas
FILENAME=S001A, SUFFIX=FIX, $

SEGMENT=S001A, SEGTYPE=S1, $
  FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A10, ACTUAL=A10, $
  FIELDNAME=WEIGHT, ALIAS=E02, USAGE=D6, ACTUAL=A06, $
  FIELDNAME=HEIGHT, ALIAS=E03, USAGE=D6, ACTUAL=A06, $
  FIELDNAME=LENGTH, ALIAS=E04, USAGE=D6, ACTUAL=A06, $
  FIELDNAME=WHEELBASE, ALIAS=E05, USAGE=D6, ACTUAL=A06, $

s001b.mas
FILENAME=S001B, SUFFIX=FIX, $

SEGMENT=S001B, SEGTYPE=S1, $
  FIELDNAME=COUNTRY, ALIAS=E01, USAGE=A10, ACTUAL=A10, $
  FIELDNAME=DIMENSIONS, ALIAS=DIMENSIONS, USAGE=A24, ACTUAL=A24, $

SEGNAME=SEGDIM, PARENT=S001B, POSITION=DIMENSIONS,  OCCURS=4, $
  FIELDNAME=DIMENSION , ALIAS=DIMENSION , USAGE=D6, ACTUAL=A6, $



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 27, 2009, 10:46 AM
Craig R.
Francis:

Great example! It really put everything together for me. I used EDAPUT to build both .MAS files in MEM, ahead of the first FILEDEF.

(NOTE to other newby's: In Managed Reporting, you say "EXEC -LINES 8 EDAPUT..." instead of "EX -LINES 8 EDAPUT..."!)

Thanks!

Craig


v8.1.04, 64-bit Windows (Reporting Server), Apache Tomcat (Web/App Server), HTML, PDF, AHTML, Excel outputs
October 27, 2009, 11:03 AM
Tony A
Craig,

Another possibility is to create it as a FOCUS file and then USE them -

USE
yourfocusfile.foc AS CRAIG1
yourfocusfile.foc AS CRAIG2
END

You can then table from the same file using different .mas.

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