DataStage routines in Unix
Posted: Thu Feb 26, 2004 10:39 am
I am constructing a DataStage "Change Data Capture" program that
compares the contents of today's daily sequential file with yesterday's
file in order to specify which records have been added, deleted or
changed.
The source file names are in the general format
"dailyfile_load_20040216_2042.dat", or
"dailyfile_load_yyyymmdd_hhmm.dat", and they will be in a directory
where each day's file will have a unique yyyymmdd_hhmm, as part of its
name.
I need to construct a DataStage routine that will capture today's and
yesterday's files and specify them as source file names.
My approach would be to construct a DataStage routine in Unix that
would capture today's date as yyyymmdd. Then I could copy today's file,
specifying the yyyymdd and using a wildcard for hhmm, to a new file with
a name in the format "dailyfile_load_20040216.dat". This new filename
could then become the DataStage sourcefile name using a DSSetParam in
the batch script.
Has anyone constructed such a routine? I am wondering if it would be
easier to find today's yyyymmdd value using BASIC in the batch script
and having it as an argument to the Unix routine, or would it be better
to find today's yyyymmdd value in Unix.
I would appreciate any and all suggestions.
Many thanks!
Kathy Armstrong
kathy.armstrong@us.fortis.com
****************************************************************
Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*****************************************************************
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users
compares the contents of today's daily sequential file with yesterday's
file in order to specify which records have been added, deleted or
changed.
The source file names are in the general format
"dailyfile_load_20040216_2042.dat", or
"dailyfile_load_yyyymmdd_hhmm.dat", and they will be in a directory
where each day's file will have a unique yyyymmdd_hhmm, as part of its
name.
I need to construct a DataStage routine that will capture today's and
yesterday's files and specify them as source file names.
My approach would be to construct a DataStage routine in Unix that
would capture today's date as yyyymmdd. Then I could copy today's file,
specifying the yyyymdd and using a wildcard for hhmm, to a new file with
a name in the format "dailyfile_load_20040216.dat". This new filename
could then become the DataStage sourcefile name using a DSSetParam in
the batch script.
Has anyone constructed such a routine? I am wondering if it would be
easier to find today's yyyymmdd value using BASIC in the batch script
and having it as an argument to the Unix routine, or would it be better
to find today's yyyymmdd value in Unix.
I would appreciate any and all suggestions.
Many thanks!
Kathy Armstrong
kathy.armstrong@us.fortis.com
****************************************************************
Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*****************************************************************
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users