Routine Generating file

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

Routine Generating file

Post 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
samba
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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"
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

Post by samba »

Thanks for you quick reply

Its Generating the output file like this

JobName2620060518og
samba
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
samba
Premium Member
Premium Member
Posts: 62
Joined: Wed Dec 07, 2005 11:44 am

Post by samba »

Thanks for your help Its working now
samba
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

Just so you know, this is a Datastage TX forum. Nice quick fix though.

:wink:
"Artificial intelligience is no match for natural stupidity."
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Thanks Jgibby for the reminder.

Moderator: Please move this thread to the appropriate forum
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply