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  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Extracting Packed Data

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Extracting Packed Data
 Login/Join
 
Platinum Member
posted
I have been scratching my head lately trying to figure out how to extract a D12.2 data element from an internal DDS table.
The field on our DDS is 144 bytes and consists of a recurring number of 12.2 elements that hold previous dollar amounts. Is there a simple solution in WF to extract this?

This message has been edited. Last edited by: T.Peters,


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
Yes there is

you should create a master with the field that holds the specific data with OCCURS=...
take a look in the documentation to find out the exaxt coding.




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
Suppose that, in your MASTER, your field is defined as:
  
FIELDNAME=PREVIOUS, ALIAS=PREV, USAGE=A144, ACTUAL=A144, $

If all your data elements are D fields, each takes up 8 bytes, hence you have 18 such fields.
Now 2 possibilities: either you want to access each field separately or you want to access them as occurences.
In the first case, you would change your MASTER to have 18 definitions of the type:
  
FIELDNAME=PREVIOUS1, ALIAS=PREV1, USAGE=D12.2, ACTUAL=D8, $
FIELDNAME=PREVIOUS2, ALIAS=PREV2, USAGE=D12.2, ACTUAL=D8, $
...
FIELDNAME=PREVIOUS18, ALIAS=PREV18, USAGE=D12.2, ACTUAL=D8, $

In the second case, you want to redefine the PREVIOUS field as follows, supposing that the PREVIOUS field is in segment SEG1:
  
SEGNAME=SEG1, ...
FIELDNAME=PREVIOUS, ALIAS=PREV, USAGE=A144, ACTUAL=A144, $
...
SEGNAME=PREVS, PARENT=SEG1, POSITION=PREVIOUS, OCCURS=18
FIELDNAME=PREVD, ALIAS=PREVD, USAGE=D12.2, ACTUAL=D8, $

When you use the field PREVD Focus will automatically loop through the occurences.


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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
<JG>
posted
In addition to Frank and Daniel's suggestion to coding an OCCURS into the master
I would also look at adding an order field

SEGNAME=SEG1, ...
FIELDNAME=PREVIOUS, ALIAS=PREV, USAGE=A144, ACTUAL=A144, $
...
SEGNAME=PREVS, PARENT=SEG1, POSITION=PREVIOUS, OCCURS=18
FIELDNAME=PREVD, ALIAS=PREVD, USAGE=D12.2, ACTUAL=D8, $

FIELD = PREVD_ORDER, ALIAS = ORDER, USAGE = I2MT, ACTUAL = I4, $

In that way you can reference each occurs element independantly
 
Report This Post
Platinum Member
posted Hide Post
Thanks for the input, guys, these sound like they might work. I'll see what I can do to get them to work. I think the SEGNAME solution will take some time to get done because I don't have the ability to manipulate the text version of the metadata through Dev Studio, but I'll see if I can copy the existing file to a new MASTER and define it as Danny suggested.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Platinum Member
posted Hide Post
Understanding that I am completely green to the FOCUS language, I had to google what you guys were suggesting I do so that I could understand what is happening. With that in mind, can you help clear something up for me that I am confused about?
I read on This site that the "POSITION" keyword indicates where the table is to start and it appears that it reads the next N fields in order until it reaches it's number of OCCURS? If that is the case, I think I explained my scenario wrong. I have 18 D12.2 values in the SAME A144 field in a packed format that I need to extract. Could I be mistaken in what I am reading?


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Expert
posted Hide Post
Can you post the COBOL description?

POSITION is used to re-describe an area in the main master. It is not necessary if the repeating fields are at the end of the record.

The best place to read about this stuff is in a mainframe FOCUS manual, the section on describing VSAM or fixed format files.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
Can you post your master?


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

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
Here's my master file text view:
quote:
FILENAME=NCP01_FS008, SUFFIX=DB2 , $
SEGMENT=NCP01_FS008, SEGTYPE=S0, $
FIELDNAME=AS_ACCOUNT_NO, ALIAS=ASACCT, USAGE=P5, ACTUAL=P3,
TITLE='ACCOUNT,NUMBER', DESCRIPTION='ACCOUNT NUMBER', $
FIELDNAME=AS_TOTAL_LOANS, ALIAS=ASTOTLN, USAGE=P8, ACTUAL=P4,
TITLE='ACCOUNT,TOTAL LOANS', DESCRIPTION='ACCOUNT TOTAL LOANS', $
FIELDNAME=AS_LN_WAV_OFF, ALIAS=ASLNWOF, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WAIVED,BY OFFICER', DESCRIPTION='LOANS WAIVED BY OFFICER', $
FIELDNAME=AS_LN_WAV_LOW_BAL, ALIAS=ASLNWLB, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WAIVED,LOW BALANCE', DESCRIPTION='LOANS WAIVED LOW BALANCE', $
FIELDNAME=AS_LN_WAV_NON_PAY, ALIAS=ASLNWNP, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WAIVED,NON PAY', DESCRIPTION='LOANS WAIVED NON PAY', $
FIELDNAME=AS_LN_INSUR, ALIAS=ASLNINS, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,INSURANCE', DESCRIPTION='LOANS WITH INSURANCE', $
FIELDNAME=AS_LN_FUND_VSI_INS, ALIAS=ASLNWFVI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS FUNDED,VSI INS', DESCRIPTION='LOANS WITH FUNDED VSI INS', $
FIELDNAME=AS_LN_NON_FUND_VSI_INS, ALIAS=ASLNWNFVI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS NON FUND,VSI INS', DESCRIPTION='LOANS WITH NON FUND VSI INS', $
FIELDNAME=AS_LN_PRIOR_VSI_INS, ALIAS=ASLNWPV, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,PRIOR VSI INS', DESCRIPTION='LOANS WITH PRIOR VSI INSUR', $
FIELDNAME=AS_LN_NO_INSUR, ALIAS=ASLNWNI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,NO INSURANCE', DESCRIPTION='LOANS WITH NO INSURANCE', $
FIELDNAME=AS_LN_CAN_INSUR, ALIAS=ASLNWCI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,CANCELLED INS', DESCRIPTION='LOANS WITH CANCELLED INSUR', $
FIELDNAME=AS_LN_EXP_INSUR, ALIAS=ASLNWEI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,EXPIRED INSUR', DESCRIPTION='LOANS WITH EXPIRED INSURANCE', $
FIELDNAME=AS_LN_AUD_STAT, ALIAS=ASLNAUD, USAGE=P8, ACTUAL=P4,
TITLE='LOANS IN,AUDIT STATUS', DESCRIPTION='LOANS IN AUDIT STATUS', $
FIELDNAME=AS_LN_TO_BE_DEL, ALIAS=ASLNDEL, USAGE=P8, ACTUAL=P4,
TITLE='LOANS TO,BE DELETED', DESCRIPTION='LOANS TO BE DELETED', $
FIELDNAME=AS_IMP_LOANS, ALIAS=ASIMPLN, USAGE=P8, ACTUAL=P4,
TITLE='IMPAIRED,LOANS', DESCRIPTION='IMPAIRED LOANS', $
FIELDNAME=AS_NON_INSUR_LOANS, ALIAS=ASNOISL, USAGE=P8, ACTUAL=P4,
TITLE='NON-INSURABLE,LOANS', DESCRIPTION='NON-INSURABLE LOANS', $
FIELDNAME=AS_CONT_LOANS, ALIAS=ASCONTL, USAGE=P8, ACTUAL=P4,
TITLE='CONTINUOUS,LOANS', DESCRIPTION='CONTINUOUS LOANS', $
FIELDNAME=AS_TRACK_LOANS, ALIAS=ASTRKLN, USAGE=P8, ACTUAL=P4,
TITLE='TRACK,LOANS', DESCRIPTION='TRACK LOANS', $
FIELDNAME=AS_TRACK_HOLD_LOANS, ALIAS=ASTKHLN, USAGE=P8, ACTUAL=P4,
TITLE='TRACK HOLD,LOANS', DESCRIPTION='TRACK HOLD LOANS', $
FIELDNAME=AS_MATURED_LOANS, ALIAS=ASMATLN, USAGE=P8, ACTUAL=P4,
TITLE='MATURED,LOANS', DESCRIPTION='MATURED LOANS', $
FIELDNAME=AS_REQ_CHGS_PAY_OFF, ALIAS=ASRCPDT, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,PAYOFF DATE', DESCRIPTION='REQUIRED CHANGES PAYOFF DATE', $
FIELDNAME=AS_REQ_CHGS_LBR, ALIAS=ASRCLBR, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,BALANCE', DESCRIPTION='REQUIRED CHANGES - BALANCE', $
FIELDNAME=AS_REQ_CHGS_COLL, ALIAS=ASRCCOL, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,COLLATERAL', DESCRIPTION='REQUIRED CHANGE - COLLATERAL', $
FIELDNAME=AS_REQ_CHGS_ADDR, ALIAS=ASRCADD, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,ADDRESS', DESCRIPTION='REQUIRED CHANGES - ADDRESS', $
FIELDNAME=AS_REQ_CHGS_VSI_DEL, ALIAS=ASRCVDL, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,VSI DELETE', DESCRIPTION='REQUIRED CHANGE - VSI DELETE', $
FIELDNAME=AS_REQ_CHGS_MATURED, ALIAS=ASRCMAT, USAGE=P8, ACTUAL=P4,
TITLE='REQ CHGS,MATURED', DESCRIPTION='REQUIRED CHANGES - MATURED', $
FIELDNAME=AS_TOT_PREM_LTR_1, ALIAS=ASTPDL1, USAGE=P13.2, ACTUAL=P6,
TITLE='TOT PREM DOL,FIRST LTRS', DESCRIPTION='TOT PREM DOLLAR - FIRST LTR', $
FIELDNAME=AS_TOT_LN_LTR_1, ALIAS=ASTLLT1, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,FIRST LETTERS', DESCRIPTION='LOANS WITH FIRST LETTERS', $
FIELDNAME=AS_LN_LTR_1_NEW, ALIAS=ASLLT1N, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR NEW', DESCRIPTION='LOANS WITH 1ST LTR NEW', $
FIELDNAME=AS_LN_LTR_1_CAN, ALIAS=ASLLT1C, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR CAN', DESCRIPTION='LOANS WITH 1ST LTR CAN', $
FIELDNAME=AS_LN_LTR_1_EXP, ALIAS=ASLLT1E, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR EXP', DESCRIPTION='LOANS WITH 1ST LTR EXP', $
FIELDNAME=AS_LN_LTR_1_AUD, ALIAS=ASLLT1A, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR AUD', DESCRIPTION='LOANS WITH 1ST LTR AUD', $
FIELDNAME=AS_LN_LTR_1_IMP, ALIAS=ASLLT1I, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR IMP', DESCRIPTION='LOANS WITH 1ST LTR IMP', $
FIELDNAME=AS_TOT_PREM_LTR_2, ALIAS=ASTPDL2, USAGE=P13.2, ACTUAL=P6,
TITLE='TOT PREM DOL,SECOND LTRS', DESCRIPTION='TOT PREM DOLLAR - SECOND LTR', $
FIELDNAME=AS_TOT_LN_LTR_2, ALIAS=ASTLLT2, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,SECOND LETTER', DESCRIPTION='LOANS WITH SECOND LETTERS', $
FIELDNAME=AS_LN_LTR_2_NEW, ALIAS=ASLLT2N, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR NEW', DESCRIPTION='LOANS WITH 2ND LTR NEW', $
FIELDNAME=AS_LN_LTR_2_CAN, ALIAS=ASLLT2C, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR CAN', DESCRIPTION='LOANS WITH 2ND LTR CAN', $
FIELDNAME=AS_LN_LTR_2_EXP, ALIAS=ASLLT2E, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR EXP', DESCRIPTION='LOANS WITH 2ND LTR EXP', $
FIELDNAME=AS_LN_LTR_2_AUD, ALIAS=ASLLT2A, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR AUD', DESCRIPTION='LOANS WITH 2ND LTR AUD', $
FIELDNAME=AS_TOT_PREM_OTH_LTR, ALIAS=ASTPDOL, USAGE=P13.2, ACTUAL=P6,
TITLE='TOT PREM DOL,OTHER LTRS', DESCRIPTION='TOT PREM DOLLAR - OTHER LTRS', $
FIELDNAME=AS_TOT_LN_OTH_LTR, ALIAS=ASTLOLT, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,OTHER LETTERS', DESCRIPTION='LOANS WITH OTHER LETTERS', $
FIELDNAME=AS_TOT_PREM_APL_BIND, ALIAS=ASTPDAB, USAGE=P13.2, ACTUAL=P6,
TITLE='TOT PREM DOL,APPL/BINDER', DESCRIPTION='TOT PREM DOL - APPL/BINDER', $
FIELDNAME=AS_LN_APPL_BIND, ALIAS=ASLAPLB, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,APPL/BINDER', DESCRIPTION='LOANS WITH APPL/BINDER', $
FIELDNAME=AS_MTD_NOTICES_PROD, ALIAS=ASMTDNP, USAGE=P8, ACTUAL=P4,
TITLE='M-T-D,NOTICES PRODUCED', DESCRIPTION='MTD NOTICES PRODUCED', $
FIELDNAME=AS_MTD_POL_WRITTEN, ALIAS=ASMTDPW, USAGE=P8, ACTUAL=P4,
TITLE='M-T-D,POLICIES WRITTEN', DESCRIPTION='MTD POLICIES WRITTEN', $
FIELDNAME=AS_MTD_WRITTEN_PREM, ALIAS=ASMTDWP, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,WRITTEN PREMIUM', DESCRIPTION='MTD WRITTEN PREMIUM', $
FIELDNAME=AS_MTD_WRITTEN_FEE, ALIAS=ASMTDWF, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,WRITTEN FEE', DESCRIPTION='MTD WRITTEN FEE', $
FIELDNAME=AS_MTD_WRITTEN_TAX, ALIAS=ASMTDWT, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,WRITTEN TAX', DESCRIPTION='MTD WRITTEN TAX', $
FIELDNAME=AS_MTD_REFUND_PREM, ALIAS=ASMTDRP, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,REFUND PREMIUM', DESCRIPTION='MTD REFUND PREMIUM', $
FIELDNAME=AS_MTD_REFUND_FEE, ALIAS=ASMTDRF, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,REFUND FEE', DESCRIPTION='MTD REFUND FEE', $
FIELDNAME=AS_MTD_REFUND_TAX, ALIAS=ASMTDRT, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,REFUND TAX', DESCRIPTION='MTD REFUND TAX', $
FIELDNAME=AS_MTD_FUNDED_PREM, ALIAS=ASMTDFP, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,FUNDED PREMIUM', DESCRIPTION='MTD FUNDED PREMIUM', $
FIELDNAME=AS_MTD_FUNDED_FEE, ALIAS=ASMTDFF, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,FUNDED FEE', DESCRIPTION='MTD FUNDED FEE', $
FIELDNAME=AS_MTD_FUNDED_TAX, ALIAS=ASMTDFT, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,FUNDED TAX', DESCRIPTION='MTD FUNDED TAX', $
FIELDNAME=AS_MTD_RESERVES, ALIAS=ASMTDRS, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,RESERVES', DESCRIPTION='MTD RESERVES', $
FIELDNAME=AS_MTD_PROFIT_LOSS, ALIAS=ASMTDPL, USAGE=P13.2, ACTUAL=P6,
TITLE='M-T-D,PROFIT/LOSS', DESCRIPTION='MTD PROFIT/LOSS', $
FIELDNAME=AS_MTD_NUMBER_LOANS, ALIAS=ASMTDNLN, USAGE=P8, ACTUAL=P4,
TITLE='MTD NBR OF,OF LOANS', DESCRIPTION='MTD NBR OF LOANS', $
FIELDNAME=AS_MTD_WL_OVER_LIMIT, ALIAS=ASMTDWLOL, USAGE=P8, ACTUAL=P4,
TITLE='MTD WAV LOANS,OVER LIMIT', DESCRIPTION='MTD WAIVED LOANS OVER LIMIT', $
FIELDNAME=AS_MTD_NUMBER_PENDING, ALIAS=ASMTDNPND, USAGE=P8, ACTUAL=P4,
TITLE='MTD NBR OF,PENDING LOANS', DESCRIPTION='MTD NBR OF PENDING LOANS', $
FIELDNAME=AS_MTD_AMOUNT_PENDING, ALIAS=ASMTDAPND, USAGE=P13.2, ACTUAL=P6,
TITLE='MTD AMT OF,PENDING LOANS', DESCRIPTION='MTD AMT OF PENDING LOANS', $
FIELDNAME=AS_MTD_TOTAL_TERM, ALIAS=ASMTDTTRM, USAGE=P8, ACTUAL=P4,
TITLE='MTD TOTAL,TERM', DESCRIPTION='MTD TOTAL TERM', $
FIELDNAME=AS_MTD_TOTAL_IN_FORCE, ALIAS=ASMTDTFRC, USAGE=P8, ACTUAL=P4,
TITLE='MTD TOTAL LOANS,IN FORCE', DESCRIPTION='MTD TOTAL LOANS IN FORCE', $
FIELDNAME=AS_MTD_TOT_LOAN_BAL, ALIAS=ASMTDTBAL, USAGE=P13.2, ACTUAL=P6,
TITLE='MTD TOT LN,BAL IN FORCE', DESCRIPTION='MTD TOT OF LOAN BAL IN FORCE', $
FIELDNAME=AS_YTD_WRITTEN_PREM, ALIAS=ASYTDWP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,WRITTEN PREMIUM', DESCRIPTION='YTD WRITTEN PREMIUM', $
FIELDNAME=AS_YTD_WRITTEN_FEE, ALIAS=ASYTDWF, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,WRITTEN FEE', DESCRIPTION='YTD WRITTEN FEE', $
FIELDNAME=AS_YTD_WRITTEN_TAX, ALIAS=ASYTDWT, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,WRITTEN TAX', DESCRIPTION='YTD WRITTEN TAX', $
FIELDNAME=AS_YTD_REFUND_PREM, ALIAS=ASYTDRP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,REFUND PREMIUM', DESCRIPTION='YTD REFUND PREMIUM', $
FIELDNAME=AS_YTD_REFUND_FEE, ALIAS=ASYTDRF, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,REFUND FEE', DESCRIPTION='YTD REFUND FEE', $
FIELDNAME=AS_YTD_REFUND_TAX, ALIAS=ASYTDRT, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,REFUND TAX', DESCRIPTION='YTD REFUND TAX', $
FIELDNAME=AS_YTD_FUNDED_PREM, ALIAS=ASYTDFP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,FUNDED PREMIUM', DESCRIPTION='YTD FUNDED PREMIUM', $
FIELDNAME=AS_YTD_FUNDED_FEE, ALIAS=ASYTDFF, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,FUNDED FEE', DESCRIPTION='YTD FUNDED FEE', $
FIELDNAME=AS_YTD_FUNDED_TAX, ALIAS=ASYTDFT, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,FUNDED TAX', DESCRIPTION='YTD FUNDED TAX', $
FIELDNAME=AS_YTD_EARNED_PREM, ALIAS=ASYTDEP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,EARNED PREMIUM', DESCRIPTION='YTD EARNED PREMIUM', $
FIELDNAME=AS_YTD_COLL_PREM, ALIAS=ASYTDCLP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,COLL PREMIUM', DESCRIPTION='YTD COLL PREMIUM', $
FIELDNAME=AS_YTD_COMP_PREM, ALIAS=ASYTDCMP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,COMP PREMIUM', DESCRIPTION='YTD COMP PREMIUM', $
FIELDNAME=AS_YTD_FT_PREM, ALIAS=ASYTDFTP, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,F&T PREMIUM', DESCRIPTION='YTD F&T PREMIUM', $
FIELDNAME=AS_YTD_REPO_LOSS, ALIAS=ASYTDRPL, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,REPO LOSS', DESCRIPTION='YTD REPO LOSS', $
FIELDNAME=AS_YTD_DUAL_LOSS, ALIAS=ASYTDDUL, USAGE=P13.2, ACTUAL=P6,
TITLE='Y-T-D,DUAL LOSS', DESCRIPTION='YTD DUAL LOSS', $
FIELDNAME=AS_ITD_WRITTEN_PREM, ALIAS=ASITDWP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,WRITTEN PREMIUM', DESCRIPTION='ITD WRITTEN PREMIUM', $
FIELDNAME=AS_ITD_WRITTEN_FEE, ALIAS=ASITDWF, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,WRITTEN FEE', DESCRIPTION='ITD WRITTEN FEE', $
FIELDNAME=AS_ITD_WRITTEN_TAX, ALIAS=ASITDWT, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,WRITTEN TAX', DESCRIPTION='ITD WRITTEN TAX', $
FIELDNAME=AS_ITD_REFUND_PREM, ALIAS=ASITDRP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,REFUND PREMIUM', DESCRIPTION='ITD REFUND PREMIUM', $
FIELDNAME=AS_ITD_REFUND_FEE, ALIAS=ASITDRF, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,REFUND FEE', DESCRIPTION='ITD REFUND FEE', $
FIELDNAME=AS_ITD_REFUND_TAX, ALIAS=ASITDRT, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,REFUND TAX', DESCRIPTION='ITD REFUND TAX', $
FIELDNAME=AS_ITD_FUNDED_PREM, ALIAS=ASITDFP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,FUNDED PREMIUM', DESCRIPTION='ITD FUNDED PREMIUM', $
FIELDNAME=AS_ITD_FUNDED_FEE, ALIAS=ASITDFF, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,FUNDED FEE', DESCRIPTION='ITD FUNDED FEE', $
FIELDNAME=AS_ITD_FUNDED_TAX, ALIAS=ASITDFT, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,FUNDED TAX', DESCRIPTION='ITD FUNDED TAX', $
FIELDNAME=AS_ITD_EARNED_PREM, ALIAS=ASITDEP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,EARNED PREMIUM', DESCRIPTION='ITD EARNED PREMIUM', $
FIELDNAME=AS_ITD_COLL_PREM, ALIAS=ASITDCLP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,COLL PREMIUM', DESCRIPTION='ITD COLL PREMIUM', $
FIELDNAME=AS_ITD_COMP_PREM, ALIAS=ASITDCMP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,COMP PREMIUM', DESCRIPTION='ITD COMP PREMIUM', $
FIELDNAME=AS_ITD_FT_PREM, ALIAS=ASITDFTP, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,F&T PREMIUM', DESCRIPTION='ITD F&T PREMIUM', $
FIELDNAME=AS_ITD_REPO_LOSS, ALIAS=ASITDRPL, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,REPO LOSS', DESCRIPTION='ITD REPO LOSS', $
FIELDNAME=AS_ITD_DUAL_LOSS, ALIAS=ASITDDUL, USAGE=P13.2, ACTUAL=P6,
TITLE='I-T-D,DUAL LOSS', DESCRIPTION='ITD DUAL LOSS', $
FIELDNAME=AS_NXT_POL_WRITTEN, ALIAS=ASNXTPW, USAGE=P8, ACTUAL=P4,
TITLE='NEXT M-T-D,POL WRITTEN', DESCRIPTION='NEXT MN POLICIES WRITTEN', $
FIELDNAME=AS_NXT_WRITTEN_PREM, ALIAS=ASNXTWP, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,WRITTEN PREM', DESCRIPTION='NEXT MN WRITTEN PREMIUM', $
FIELDNAME=AS_NXT_WRITTEN_FEE, ALIAS=ASNXTWF, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,WRITTEN FEE', DESCRIPTION='NEXT MN WRITTEN FEE', $
FIELDNAME=AS_NXT_WRITTEN_TAX, ALIAS=ASNXTWT, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,WRITTEN TAX', DESCRIPTION='NEXT MN WRITTEN TAX', $
FIELDNAME=AS_NXT_REFUND_PREM, ALIAS=ASNXTRP, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,REFUND PREM', DESCRIPTION='NEXT MN REFUND PREMIUM', $
FIELDNAME=AS_NXT_REFUND_FEE, ALIAS=ASNXTRF, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,REFUND FEE', DESCRIPTION='NEXT MN REFUND FEE', $
FIELDNAME=AS_NXT_REFUND_TAX, ALIAS=ASNXTRT, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,REFUND TAX', DESCRIPTION='NEXT MN REFUND TAX', $
FIELDNAME=AS_NXT_FUNDED_PREM, ALIAS=ASNXTFP, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,FUNDED PREM', DESCRIPTION='NEXT MN FUNDED PREMIUM', $
FIELDNAME=AS_NXT_FUNDED_FEE, ALIAS=ASNXTFF, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,FUNDED FEE', DESCRIPTION='NEXT MN FUNDED FEE', $
FIELDNAME=AS_NXT_FUNDED_TAX, ALIAS=ASNXTFT, USAGE=P13.2, ACTUAL=P6,
TITLE='NEXT M-T-D,FUNDED TAX', DESCRIPTION='NEXT MN FUNDED TAX', $
FIELDNAME=AS_PREV_FUNDED_PREM, ALIAS=ASPRVFP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,FUNDED PREM', DESCRIPTION='PREV 24 MN FUNDED PREMIUM', $
FIELDNAME=AS_PREV_FUNDED_FEE, ALIAS=ASPRVFF, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,FUNDED FEE', DESCRIPTION='PREV 24 MN FUNDED FEE', $
FIELDNAME=AS_PREV_REFUND_PREM, ALIAS=ASPRVRP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,REFUND PREM', DESCRIPTION='PREV 24 MN REFUND PREMIUM', $
FIELDNAME=AS_PREV_REFUND_FEE, ALIAS=ASPRVRF, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,REFUND FEE', DESCRIPTION='PREV 24 MN REFUND FEE', $
FIELDNAME=AS_PREV_NET_PREM, ALIAS=ASPRVNP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,NET PREMIUM', DESCRIPTION='PREV 24 MN NET PREMIUM', $
FIELDNAME=AS_PREV_NET_FEE, ALIAS=ASPRVNF, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,NET FEE', DESCRIPTION='PREV 24 MN NET FEE', $
FIELDNAME=AS_PREV_NET_TAX, ALIAS=ASPRVNT, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,NET TAX', DESCRIPTION='PREV 24 MN NET TAX', $
FIELDNAME=AS_PREV_EARNED_PREMIUM, ALIAS=ASPRVERN, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,EARN PREM', DESCRIPTION='PREV 24 MN EARNED PREM', $
FIELDNAME=AS_PREV_COLL_PREM, ALIAS=ASPRVCLP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,COLLISION PREM', DESCRIPTION='PREV 24 MN COLLISION PREM', $
FIELDNAME=AS_PREV_COMP_PREM, ALIAS=ASPRVCMP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,COMP PREM', DESCRIPTION='PREV 24 MN COMP PREM', $
FIELDNAME=AS_PREV_FT_PREM, ALIAS=ASPRVFTP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,F & T PREM', DESCRIPTION='PREV 24 MN - F & T PREM', $
FIELDNAME=AS_PREV_LOSSES, ALIAS=ASPRVLOS, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,LOSSES', DESCRIPTION='PREV 24 MN LOSSES', $
FIELDNAME=AS_PREV_RESERVES, ALIAS=ASPRVRES, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,RESERVES', DESCRIPTION='PREV 24 MN RESERVES', $
FIELDNAME=AS_PREV_PENETRATION_PCT, ALIAS=ASPRVPTNP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,PENETRATION PCT', DESCRIPTION='PREV 24 MN PENETRATION PCT', $
FIELDNAME=AS_PREV_WAIVED_PCT, ALIAS=ASPRVWAVP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,WAIVED PCT', DESCRIPTION='PREV 24 MN WAIVED PERCENT', $
FIELDNAME=AS_PREV_FLAT_CANCELLED, ALIAS=ASPRVFCN, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,FLAT CANC', DESCRIPTION='PREV 24 MN FLAT CANC', $
FIELDNAME=AS_PREV_CARRIER_COST, ALIAS=ASPRVCAR, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,CARRIER COST', DESCRIPTION='PREV 24 MN CARRIER COST', $
FIELDNAME=AS_PREV_COUNTY_M_COST, ALIAS=ASPRVCTY, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,COUNTY M COST', DESCRIPTION='PRV 24 MN COUNTY MUTUAL COST', $
FIELDNAME=AS_PREV_TAX_COST, ALIAS=ASPRVTAX, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,TAX COST', DESCRIPTION='PREV 24 MN TAX COST', $
FIELDNAME=AS_PREV_ACCOUNT_COST, ALIAS=ASPRVACC, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,ACCOUNT COST', DESCRIPTION='PREV 24 MN ACCOUNT COST', $
FIELDNAME=AS_PREV_AGENT_COST, ALIAS=ASPRVAGT, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,AGENT COST', DESCRIPTION='PREV 24 MN AGENT COST', $
FIELDNAME=AS_PREV_SERVICE_COST, ALIAS=ASPRVSER, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,SERVICE COST', DESCRIPTION='PREV 24 MN SERVICE COST', $
FIELDNAME=AS_PREV_DATA_PROC_COST, ALIAS=ASPRVDP, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,DATA PROC COST', DESCRIPTION='PREV 24 MN DATA PROC COST', $
FIELDNAME=AS_PREV_EQUIPMENT_COST, ALIAS=ASPRVEQU, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,EQUIPMENT COST', DESCRIPTION='PREV 24 MN EQUIPMENT COST', $
FIELDNAME=AS_PREV_OTHER_COST, ALIAS=ASPRVOTH, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,OTHER COST', DESCRIPTION='PREV 24 MN OTHER COST', $
FIELDNAME=AS_LN_LTR_2_IMP, ALIAS=ASLLT2I, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR IMP', DESCRIPTION='LOANS WITH 2ND LTR IMP', $
FIELDNAME=AS_SPARE_CNT_2, ALIAS=ASSPCNT2, USAGE=P8, ACTUAL=P4,
TITLE='SPARE,CNT 2', DESCRIPTION='SPARE COUNTER TWO', $
FIELDNAME=AS_SPARE_CNT_3, ALIAS=ASSPCNT3, USAGE=P8, ACTUAL=P4,
TITLE='SPARE,CNT 3', DESCRIPTION='SPARE COUNTER THREE', $
FIELDNAME=AS_SPARE_AMT_1, ALIAS=ASSPAMT1, USAGE=P13.2, ACTUAL=P6,
TITLE='SPARE,AMT 1', DESCRIPTION='SPARE AMOUNT ONE', $
FIELDNAME=AS_SPARE_AMT_2, ALIAS=ASSPAMT2, USAGE=P13.2, ACTUAL=P6,
TITLE='SPARE,AMT 2', DESCRIPTION='SPARE AMOUNT TWO', $
FIELDNAME=AS_SPARE_AMT_3, ALIAS=ASSPAMT3, USAGE=P13.2, ACTUAL=P6,
TITLE='SPARE,AMT 3', DESCRIPTION='SPARE AMOUNT THREE', $
FIELDNAME=AS_PREV_SPARE_1, ALIAS=ASPRVSP1, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,SPARE 1', DESCRIPTION='PREV 24 MN SPARE 1', $
FIELDNAME=AS_PREV_SPARE_2, ALIAS=ASPRVSP2, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,SPARE 2', DESCRIPTION='PREV 24 MN SPARE 2', $
FIELDNAME=AS_PREV_SPARE_3, ALIAS=ASPRVSP3, USAGE=A144, ACTUAL=A144,
TITLE='PREV 24,SPARE 3', DESCRIPTION='PREV 24 MN SPARE 3', $
FIELDNAME=AS_LAST_PROC_DATE, ALIAS=ASPROCDT, USAGE=P8, ACTUAL=P4,
TITLE='DATE OF LAST,PROCESSING', DESCRIPTION='DATE OF LAST PROCESSING', $
FIELDNAME=AS_TOT_PREM_LTR_3, ALIAS=ASTPDL3, USAGE=P13.2, ACTUAL=P6,
TITLE='TOT PREM DOL,3RD LTRS', DESCRIPTION='TOT PREM DOLLAR - 3RD LTR', $
FIELDNAME=AS_TOT_LN_LTR_3, ALIAS=ASTLLT3, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LETTER', DESCRIPTION='LOANS WITH 3RD LETTERS', $
FIELDNAME=AS_LN_LTR_3_NEW, ALIAS=ASLLT3N, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR NEW', DESCRIPTION='LOANS WITH 3RD LTR NEW', $
FIELDNAME=AS_LN_LTR_3_CAN, ALIAS=ASLLT3C, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR CAN', DESCRIPTION='LOANS WITH 3RD LTR CAN', $
FIELDNAME=AS_LN_LTR_3_EXP, ALIAS=ASLLT3E, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR EXP', DESCRIPTION='LOANS WITH 3RD LTR EXP', $
FIELDNAME=AS_LN_LTR_3_AUD, ALIAS=ASLLT3A, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR AUD', DESCRIPTION='LOANS WITH 3RD LTR AUD', $
FIELDNAME=AS_LN_LTR_3_IMP, ALIAS=ASLLT3I, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR IMP', DESCRIPTION='LOANS WITH 3RD LTR IMPARED', $
FIELDNAME=AS_Q_IMP_LOANS, ALIAS=ASQIMPLN, USAGE=P8, ACTUAL=P4,
TITLE='Q IMPAIRED,LOANS', DESCRIPTION='Q IMPAIRED LOANS', $
FIELDNAME=AS_LN_LTR_1_Q_IMP, ALIAS=ASLLT1QI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR Q IMP', DESCRIPTION='LOANS WITH 1ST LTR Q IMPARED', $
FIELDNAME=AS_LN_LTR_2_Q_IMP, ALIAS=ASLLT2QI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR Q IMP', DESCRIPTION='LOANS WITH 2ND LTR Q IMPARED', $
FIELDNAME=AS_LN_LTR_3_Q_IMP, ALIAS=ASLLT3QI, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR Q IMP', DESCRIPTION='LOANS WITH 3RD LTR Q IMPARED', $
FIELDNAME=AS_I_IMP_LOANS, ALIAS=ASIIMPLN, USAGE=P8, ACTUAL=P4,
TITLE='I IMPAIRED,LOANS', DESCRIPTION='I IMPAIRED LOANS', $
FIELDNAME=AS_LN_LTR_1_I_IMP, ALIAS=ASLLT1II, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,1ST LTR I IMP', DESCRIPTION='LOANS WITH 1ST LTR I IMPARED', $
FIELDNAME=AS_LN_LTR_2_I_IMP, ALIAS=ASLLT2II, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,2ND LTR I IMP', DESCRIPTION='LOANS WITH 2ND LTR I IMPARED', $
FIELDNAME=AS_LN_LTR_3_I_IMP, ALIAS=ASLLT3II, USAGE=P8, ACTUAL=P4,
TITLE='LOANS WITH,3RD LTR I IMP', DESCRIPTION='LOANS WITH 3RD LTR I IMPARED', $


My table are all the "Prev" fields, specifically ASPRVER. That is my 144 byte field that has the packed data in it.

The COBOL looks like this:

05 ACCUM-RANGE-HISTORICAL
OCCURS 14 TIMES.
* * 1-MTH1 2-MTH2 3-MTH3 4-MTH4 5-MTH5 6-MTH6 7-MTH7 8-MTH8 9-MTH9 10-MTH10 11-MTH11 12-MTH12 13-TOTAL (1 THRU 12 MTHS) 14-TOTAL (13 THRU 24 MTHS) **

07 H-NET-PREM PIC S9(09)V99.
07 H-NET-FEE PIC S9(09)V99.
07 H-EARNED-PREMIUM PIC S9(09)V99.
07 H-PAID-LOSSES PIC S9(09)V99.
07 H-LOSS-RATIO PIC S9(09)V99.
07 H-PENETRATION-PCT PIC S9(09)V99.
07 H-WAIVED-PCT PIC S9(09)V99.
07 H-FLAT-CANCELLED PIC S9(09)V99.
07 H-ITD-FUNDED-PREM PIC S9(09)V99.
07 H-ITD-REFUND-PREM PIC S9(09)V99.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Expert
posted Hide Post
Here is a sample of what your master might look like for just the earned premium. You would have to repeat this for every group. You will need a segment for every group. After your regular part of the master, you add:

SEGNAME=ERNDPREM,SEGTYPE=S0,PARENT=NCP01_FS008,POSITION=AS_PREV_EARNED_PREMIUM,OCCURS=24,$
$ Not quite sure how many occurences you have.
FIELDNAME=EARNED_PREMIUM,ALIAS=ERND_PREM, FORMAT=P12.2,ACTUAL=P6,$
FIELDNAME=EARNED_ORDER, ALIAS = ORDER, USAGE = I2MT, ACTUAL = I4, $
$ Previous line from JG and optional.

Replicate this block in order for each group you need to redefine.

Hope this helps.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Well this was a very valuable learning lesson for us at SWBC. We learned that it is very important to realize that DB2 on the iSeries is very different than being on a SQL Server, Oracle, or some other file structure.

What we learned in regards to this problem is that a DB2 structure has no mechanism for storing values in an internal table, so an OCCURS clause will not work for us. IBI support in New York seemed to thing that being iSeries DB2 may provide us some mechanism for incorporating that ability, but we haven't been explained that solution yet.

So what did I do to get this data out? Ok, first I went into Data Migrator and opened the SQL statement that would pull from my MFD. I created a new define field using that source and used the HEX() function to first pull the data out of packed format. This effectively put the entire A144 field into a giant text string.

002820
00160F = 00002186200F

There were 24 of these in the giant text. I was then able to substring out the values I needed and in my SQL statement in DM, I moved the 24 substringed fields into their new locations in my newly created source.

My final command looked like:

SUBSTR(HEX(AS_PREV_EARNED_PREMIUM) FROM n FOR 11)

This is EXTREMELY cumbersome, but unless IBI can work out the simpler way to do this, I suppose it will just have to be accepted.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Gold member
posted Hide Post
T.Peters,

I think in your case that the best solution would be for you to create a set of user written subroutines that can extract data from a given 144 byte cluster into a given field. As you know from this thread, FOCUS can probably read your data using an alternate master, but this requires a different master for every request you make. (This would be done in two steps: first, the DB2 request to get the raw data into a hold file, and then a second request from the hold file but using the alternate master).

The user functions would look something like this:

 
   MYFLDA/P12.2 = GET144(ASPRVSP1,1,MYFLDA) ; 
   MYFLDB/P12.2 = GET144(ASPRVSP1,2,MYFLDB) ;
   MYFLDC/P12.2 = GET144(ASPRVSP1,3,MYFLDC) ;
   MYFLDD/P12.2 = GET144(ASPRVSP1,4,MYFLDD) ;
 


Here, e.g., you are obtaining the first 4 values from the field ASPRVSP1 (one of your 144 byte segments)

These functions should be very simple to write, but it will require 3GL expertise, and as I'm not an iSeries specialist, I can't guarantee success. But it should work, and once you've written one, all others will be very simple.

You can even write, for example, routines to do special processing on the 144 byte fields:

 
   MYAVG/P12.2 = GET144AV(ASPRVSP1,MYAVG) ; 
 


This is also the kind of thing you can have done using IBI's professional services. They can write a few of these for you, and using them as a template, you can write any others you may need.


IBI Development
 
Posts: 61 | Registered: November 15, 2005Report This Post
Expert
posted Hide Post
What about creating a DB2 view that would do all the subtringing in SQL?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Extracting Packed Data

Copyright © 1996-2020 Information Builders