Focal Point
Join where one key is alpha, one key is integer

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

March 26, 2008, 01:50 PM
Carroll
Join where one key is alpha, one key is integer
In SQL, this works:

SELECT * FROM
MNDS.DISBCLM A,
MIDIB.CLACTHIS B
WHERE
PGM_BNFT_CD = '02' AND
ADJU_LVL_CD = 'IN' AND
INT(A.EDIB_FLDR_NUM) = B.FLDR_NUM
;

How would I go about doing this in Developer Studio 764? I've tried various things to no avail. What tools would produce this kind of result, where I need to convert one key to integer to match the other key?

Thanks,

Carroll Rinehart


FOCUS 7.6.11 for Mainframe
z/OS - DB2 & Flat Files
Developer Studio 7.6.4
Windows XP Professional SP 2
Output: Excel, PDF
March 26, 2008, 02:21 PM
Leah
Look into the 'defined based join'. (EXAMPLE ASSUMES THE NUMERIC FIELD IS I9) Assuming Wink no typo's

JOIN EDITFIELD WITH EDIB_FLDR_NUM IN DISBCLM TO FLDR_NUM IN CLACTHIS AS J0
END
DEFINE FILE DISBCLM
EDITFIELD/I9 = EDIT(EBDIB_FLD_NUM);
END
TABLE FILE DISBCLM
WHERE
PGM_BNFT_CD = '02' AND
ADJU_LVL_CD = 'IN'
PRINT *
END

Drawback to this is with defined based joins optimization is bad.

OTHER OPTION use the SQL passthru capabilities.

Also, Carroll, would you add the version of WebFOCUS you are using to your signature. Not all things work in all versions.


Leah
March 26, 2008, 02:36 PM
Carroll
Will do. Thanks Leah.


FOCUS 7.6.11 for Mainframe
z/OS - DB2 & Flat Files
Developer Studio 7.6.4
Windows XP Professional SP 2
Output: Excel, PDF