Shell Script

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
Bram
Participant
Posts: 35
Joined: Mon Dec 27, 2004 11:40 am

Shell Script

Post by Bram »

Hello every one,

Does anybody tell me how to write a shell script, it should run a sql in oracle, rename the file like , file name and on which date the script ran (file name+mm/dd/yyyy) and do ftp on to the ftp server.

Thanks in advance,
Bram
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

The requirements can be performed using DataStage itself.
dsxuserrio
Participant
Posts: 82
Joined: Thu Dec 02, 2004 10:27 pm
Location: INDIA

Post by dsxuserrio »

Bram
The / may pose a problem in unix filenames Do you want date as mm/dd/yy ?? Or is mm-dd-yyyy is fine??
dsxuserrio

Kannan.N
Bangalore,INDIA
Bram
Participant
Posts: 35
Joined: Mon Dec 27, 2004 11:40 am

Shell Script

Post by Bram »

Hi Sainath,

Could you please more elaborate? That is also iam looking at.

Thanks
Bram
Bram
Participant
Posts: 35
Joined: Mon Dec 27, 2004 11:40 am

Shell Script

Post by Bram »

mm-dd-yyyy is fine?? Also iam want to schedule it using Cron

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

Post by Sainath.Srinivasan »

Use OracleOCI stage with your SQL (and configuration values) followed by a seq file and link them.

It is good practice to use a transformer between them.

Pass the date (in your required format) as parameter and substitute it in the file name derivation.
Post Reply