File properties as source columns
Moderators: chulett, rschirm, roy
File properties as source columns
I have a requirement where I need to compare the Modified Timestamp or Created Timestamp of the input file and If there is a new file, Job needs to be run, if not another flow.
Can we use the file properties as source columns in the Datastage job or as job parameters so that I can use Nested Condition activity of the sequence to check for the condition and decide the flow?
Can we use the file properties as source columns in the Datastage job or as job parameters so that I can use Nested Condition activity of the sequence to check for the condition and decide the flow?
HB
Sorry but you need to compare the timestamps to what - each other? A list of filenames you've already processed and their timestamps? Mostly curious what a 'new' file means, exactly. If that also includes a modified version of a file you've already processed, for instance.
There are ways to get just the file properties into a job, UNIX would make it easier than Windows and I can't get to the Windows command line here to play. Blocked by Group Policy. Yay.
There are ways to get just the file properties into a job, UNIX would make it easier than Windows and I can't get to the Windows command line here to play. Blocked by Group Policy. Yay.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
You have MKS tool kit. So you can still run most of the unix commands. One way of doing; get the modified time stamp using command activity stages, cleanse the command output for both files and compare.
In the last project i did the same validation.
In the last project i did the same validation.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
I know it is there in 11.3, but just checked the latest version and it seems still using.
http://www.ibm.com/support/knowledgecen ... rsion.html
http://www.ibm.com/support/knowledgecen ... rsion.html
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Okay, must have been something about it being re-architected. However, it can still be pretty mysterious if all someone has known is Windows. And that through the mouse-driven GUI without all of that goofy type-y type-y command line DOS stuff old folks like me use to live and die with.
Still waiting for requirement clarifications from our OP...
Still waiting for requirement clarifications from our OP...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hmm - I also saw presentations last year from IBM saying they were removing MKS Toolkit from future versions DataStage. However, it does seem to be there.
Must have reversed course or delayed the change. I do know it would cause problems for several customers that have designs that use certain UNIX commands even when on Windows....
Must have reversed course or delayed the change. I do know it would cause problems for several customers that have designs that use certain UNIX commands even when on Windows....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create one or more DataStage server routines that you can call from Routine activities in a sequence job.
In these use OPENSEQ to open the file(s), then the STATUS statement to obtain the property values. Don't forget CLOSESEQ before returning from the routine. I suggest that you return all the information you require using a dynamic array (delimited string).
In these use OPENSEQ to open the file(s), then the STATUS statement to obtain the property values. Don't forget CLOSESEQ before returning from the routine. I suggest that you return all the information you require using a dynamic array (delimited string).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
DataStage itself is no longer relying on MKS Toolkit. All previous "UNIX" calls from DataStage code have now been rewritten to invoke native Windows equivalents (as much as possible, with some custom code to cope the the remainder).
However, MKS Toolkit continues to ship because of all those folks who have chosen to make use of its functionality.
However, MKS Toolkit continues to ship because of all those folks who have chosen to make use of its functionality.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.