After Job Routine to archive input file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

After Job Routine to archive input file

Post by Titto »

Hi,
I need to archive input file (created thru job parameter -created based on input parameter for the job - so i don't know the entire file name but i know AAAA.BBBB.XXXX - where XXXX is dynamically changes). I want to use EXECSL after job routine to use and archive my input file, we a have in house shell script to archive files it accepts 3 values as 'Input file', 'Input file path' and 'Archive file path' . I want to use of it and pass the values to execte EXECSL.
For my job Inputfile name will be - "AAAA.BBBB.XXXX" -
1) can i use job parameter in as a input argument for EXECSL ?
2) what would be the command for after job routine of EXECSL.

Any help appreciated.

Thanks
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

It is EXECSH - not EXECSL - typo
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

1) Sure - just enclose it in hash signs like 'normal'.

2) The name of your script. Actually, the full path to your script. Followed by the appropriate argument list.
-craig

"You can never have too many knives" -- Logan Nine Fingers
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Titto,

first of all you are (as editor) able to edit any post and correct typos.

second, yes you can!

Wolfgang
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Hi Craig,

i gave like

"cd fullpath/XXXX.ksh #InputFile# #InputPath# #ArchivePath#"

is it correct.. or do i need to separate it by commas.

new to this stuff..

Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Get rid of the 'cd' part and you should be fine:

"fullpath/XXXX.ksh #InputFile# #InputPath# #ArchivePath#"

Assuming 'fullpath' starts from root - i.e. with a forward slash.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

I am getting following error when i provided

"/fullpath/Archive.ksh #InputFileName# #InputPath# #ArchivePath#"

Error

*** Output from command was: ***
SH:"/fullpath/Archive.ksh InputFileName InputPath ArchivePath: not found.

Do i need to provide anything else apart from parameter.

Thanks
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Let us know how those parameter values are passed to the job.

So that we can easily identify what the problem is.

Regards
Saravanan
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

There must not be any quotes around the command.
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

it worked out.. No quotes.. !
Thanks all!
Post Reply