Page 1 of 1

Routine Generating file

Posted: Thu May 18, 2006 11:28 am
by samba
i Build one routine, its generating one output file with file is as follows

This is the code is generating below file name:
code: JobName : oconv(@DATE, "D-YMD[4,2,2]") : "_" : oconv(@TIME, "MT") ".log"

File Name:JobName_262006-05-18_12:12:10.log

this file i tried to read from sequential file, i am not able to view the data(view data option)

i am getting the error in the following format

When processing argument -fileWhen processing path: /home/ramir1/JobName_262006-05-18_12:12:10.log is not a valid path name: Invalid hostname: /home/ramir1/JobName_262006-05-18_12
>##E TCOS 000029 12:25:35(008) <main_program> Creation of a step finished with status = FAILED.

I remove _12:12:10 this last things, then its working but i need to timestamp

Can any body help me regarding this

Thanks in Advance

Posted: Thu May 18, 2006 11:45 am
by DSguru2B
Build your file with timestamp with only numbers. Use the following code

Code: Select all


JobName : oconv(@DATE, "DYMD[4,2,2]":@VM:"MCN") : oconv(@TIME, "MT":@VM:"MCN") ".log"

Posted: Thu May 18, 2006 12:16 pm
by samba
Thanks for you quick reply

Its Generating the output file like this

JobName2620060518og

Posted: Thu May 18, 2006 12:32 pm
by DSguru2B
Try this

Code: Select all

JobName :"_": oconv(@DATE, "DYMD[4,2,2]":@VM:"MCN"):"_" : oconv(@TIME, "MT":@VM:"MCN") : ".log" 

This should give you JobName_20060518_1432.log

Posted: Thu May 18, 2006 12:37 pm
by samba
Thanks for your help Its working now

Posted: Thu May 18, 2006 12:46 pm
by jgibby
Just so you know, this is a Datastage TX forum. Nice quick fix though.

:wink:

Posted: Thu May 18, 2006 12:48 pm
by DSguru2B
Thanks Jgibby for the reminder.

Moderator: Please move this thread to the appropriate forum

Posted: Thu May 18, 2006 2:28 pm
by ray.wurlod
Is it for server (as suggested by Oconv) or parallel (as designated in the original post), or is it actually a TX question?