Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] DataMigrator - To append current date in destination file name
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] DataMigrator - To append current date in destination file name
 Login/Join
 
Member
posted
Using DataMigrator - Version 7 Release 7.06.
Source is database table and destination is a flat file. For example, if the job name is 'ABC' and job run date is today (17/09/2015) then the naming convention for the destination file should be 'ABC-20150917.txt'. So how do I append the current date so that it dynamically added in destination file name.

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: June 12, 2015Reply With QuoteReport This Post
Member
posted Hide Post
Can anyone help me on this topic?


WebFOCUS 8
Windows, All Outputs
 
Posts: 3 | Registered: June 12, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Edit the .mas file in the DMC and add a global parameter to it. Then change the DATASET reference to the variable:

 DATASET='&&OUTFILE', $ 


Use a variable object in the process flow to set the value before the data flow object:

 &&OUTFILE = 'baseapp/ABC-' || &YYMD || '.txt' 


You can change 'baseapp' to any application name.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1100 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Here is a the real example of a .mas:

FILENAME=SAMPLE_HALFWIDTH_CSV, SUFFIX=DFIX    ,
 DATASET=&&OUTFILE, $
 VARIABLE NAME=&&OUTFILE,  DEFAULT='files/sample_20150901.csv', $
  SEGMENT=SAMPLE_HALFWIDTH_CSV, SEGTYPE=S0, $
    FIELDNAME=FIELD_1, USAGE=I3, ACTUAL=A1, $
    FIELDNAME=FIELD_2, USAGE=I10, ACTUAL=A8, $  


The set statement:

&&OUTFILE='files/sample_' || &YYMD || '.csv'  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1100 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] DataMigrator - To append current date in destination file name

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.