After-Job Routine

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

madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

After-Job Routine

Post by madhonrougeuri »

Hi All,
I need to delete data from the source after the job finishes.I figured out that I need to write an after-job subroutine to achieve this.Does any body have a routine to accomplish this?
Thanks,
Madhu
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

What source? How do you want to do it? Bat script? Perl script? After-job routines call to ExecDOS to run any Windoze command line program will do what you need.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

Post by madhonrougeuri »

Thanks for the reply Ken.My source is in JdEdwards buffer files..and I want to delete the data in buffer files after the job is finished.I need a script to run from windows...
madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

Post by madhonrougeuri »

I dont see the ExecDos in the Built-in before/after subroutines?why is it so?
deepbanerji
Participant
Posts: 14
Joined: Fri Sep 03, 2004 2:50 pm
Location: NJ

Post by deepbanerji »

madhonrougeuri wrote:I dont see the ExecDos in the Built-in before/after subroutines?why is it so?
Go to "Job properties" window and check Before-job subroutine After-job subroutine Drop down boxes.
madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

Post by madhonrougeuri »

I did check it.I didnot find it.There are only four of them.......
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Include it under 'ExecSH'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If ExecDOS is not there, either someone has removed it (some people believe it's dangerous to permit access to the operating system), or your DataStage server is incompletely installed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or they are running a UNIX server, in spite of how the post is labelled. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ExecDOS installs on UNIX servers. :P
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Really? I don't recall ever seeing it in any of my drop-down lists... ExecSH yes, but no ExecDOS. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

chulett wrote:Really? I don't recall ever seeing it in any of my drop-down lists... ExecSH yes, but no ExecDOS. :?

Check your install under Routines\Built-In\Before/After. On release 7.1 and prior Unix servers ExecDOS does not appear. On NT servers it is there. Trust us :wink:
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

Post by madhonrougeuri »

Thanks for all the help...
Could somebody tell me if I could acheive the same (clear JdEdwards source files)using CALL DSExecute("............") from job control?
Thanks,
madhu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

kcbland wrote:Check your install under Routines\Built-In\Before/After. On release 7.1 and prior Unix servers ExecDOS does not appear. On NT servers it is there. Trust us :wink:
I do trust you, Uncle Ken. :wink: I'm sure there's an ExecDOS on a Windows server and (only having made it to 7.0.1 so far) hadn't seen one on a UNIX server install. Yet. Not sure why you'd need one, but...

Someday, 7.5 will be within my grasp - and I'll be one step closer to World Domination. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
madhonrougeuri
Participant
Posts: 24
Joined: Sun Jan 23, 2005 3:36 pm

Post by madhonrougeuri »

Hi.
I tried to delete the records in the JDedwards buffer file(DB2/As400)...but it doenst allow me to perform any operations except for Select.
Error i got is:
SQL statement:DELETE FROM JDEDTA.F56BO04
SQLSTATE=S1000, DBMS.CODE=-7008
[DataStage][SQL Client][ODBC][INTERSOLV][ODBC 20101 driver][DB2/400]F56BO04 in JDEDTA not valid for operation.
I have full authority to the source file..
Could some body give me any pointers.......
Thanks..
Post Reply