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  iWay Software Product Forum on Focal Point    [SOLVED] DMC Variables - Job ID

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DMC Variables - Job ID
 Login/Join
 
Member
posted
Is there a 'Job ID' global variable that I can capture and add to my load. I want to:
1. Tag all dimension adds and updates with a job_id
2. Reference all fact rows to a job_id

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8.0
HTML
 
Posts: 20 | Location: Guelph, Ontario | Registered: May 17, 2013Report This Post
Guru
posted Hide Post
Do you just want the name of your flow? That's just &&CM__REQUEST.

Or do you want the system generated Job ID: 20130712145922_86ae5901?

That's a bit tricky because the Job ID is generated by the scheduler so it's not available in the the running flow. However you could get it from the DataMigrator log. Note that this will only work with scheduled or submitted flows. If you run a flow from the DMC or WC the scheduler doesn't get used.

Create a stored procedure with the following.

-DEFAULT &JOBNAME=''
-SET &JOBNAME=GETTOK(&&CM__REQUEST, 128, 2, '/', 64, 'A64');
-TYPE JOBNAME &JOBNAME 
-DEFAULT &JOBID = ' '
 SQL
SELECT S_REQ_ID AS JOBID
 FROM ETLSTATS  
 WHERE STAT_SBM_T IN    
    (SELECT MAX(STAT_SBM_T )FROM ETLSTATS      WHERE S_REQ_NAME = '&JOBNAME') ;
TABLE ON TABLE HOLD AS JOBID FORMAT ALPHA
END
-RUN
-READFILE JOBID
-TYPE JOB ID &JOBID 
-SET &&JOBID=&JOBID;


Now you have a global variable &&JOBID that you can use in your transformations. Also this assumes that you are only running one flow of the same name at a time.

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


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Member
posted Hide Post
quote:
Job ID: 20130712145922_86ae5901


Thanks Clif.

I am looking for the Job ID: 20130712145922_86ae5901. I'll try the stored procedure that you have suggested.

Thanks,

David


Webfocus 8.0
HTML
 
Posts: 20 | Location: Guelph, Ontario | Registered: May 17, 2013Report This Post
Member
posted Hide Post
Works fantastic! Thanks for the help


Webfocus 8.0
HTML
 
Posts: 20 | Location: Guelph, Ontario | Registered: May 17, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] DMC Variables - Job ID

Copyright © 1996-2020 Information Builders