IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

user exits in Column Map procedures


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jzhardy

Active User


Joined: 31 Oct 2006
Posts: 131
Location: brisbane

PostPosted: Wed Feb 16, 2022 11:07 am
Reply with quote

Suppose I have a Table Map XXX.TBLMAP defined for Table1, Table2 ... TableN.

I have defined a column map procedure called XXX.MASK() that performs a set of column level transformations.

On my Table Map XXX.TBLMAP I reference the column map procedure XXX.YYY() against the first column of each table.


eg : my Table Map might show :

Code:
Extract Tables       Destination Table Name     Type   Column Map
--------------------- ------------------------->> ------- ----------
************************************* TOP **************************
TABLE1                  TABLE1                    TABLE   LOCAL     
TABLE2                  TABLE2                    TABLE   LOCAL     


and at the LOCAL column map level I might have ...

Code:
    ---TABLE1  ----  --------         ---TABLE1  ----  --------
Cmd     Source Column     Data Type   Num Destination Column Data Type  Status
--- ------------------->> ----------  --- ------------------ ---------- ------
*** *********************************** TOP **********************************
___ PROC XXX.YYY()                      1 ID                 DEC(15,0)  Lua   
    abcde                 CH(4)         2 abcde              CH(4)      EQUAL
etc


    ---TABLE2  ----  --------         ---TABLE2  ----  --------
Cmd     Source Column     Data Type   Num Destination Column Data Type  Status
--- ------------------->> ----------  --- ------------------ ---------- ------
*** *********************************** TOP **********************************
___ PROC XXX.YYY()                      1 ID                 DEC(15,0)  Lua   
    qwert                 CH(8)         2 qwert              CH(8)      EQUAL
etc



the problem I have with this is :

1\ PROC XXX.YYY() needs to be attached (as above) to every table in my table map XXX.TBLMAP. I really want
it to be tied to Table Map XXX.TBLMAP, not to tables within XXX.TBLMAP. Can this be done ?

2\ contrary to what I would expect - but probably because of 1\ - user exit cm_load() gets called once for every table processed. I use
cm_load() to read from an input file to establish the transformation (masking) rules. I only want to do this once, and also use this User Exit
as a place to set all my global session variables.

Based on IBM's own documentation, function cm_load() should get called once only before any tables are processed. This is the behaviour
that I want, but each reference to XXX.YYY() seems to force a new invocation of cm_load() and hence a new global variable stack.


any help appreciated !
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts How to delete a user's alias from the... JCL & VSAM 11
Search our Forums:

Back to Top