Error handling in web services

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
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Error handling in web services

Post by srai »

Hi All,

I am inprocess of building a DataStage job which can consume web services. For normal logic I have checked and web service is working fine.

Now my requirement is-

The record of any failed update should be written to flat file, mean let suppose there are 10 records coming from source and only 6 get updated in target that is a portal (using web service). Remaining 4 failed records should be stored in a flat file.
When the job starts, it will first look for the existence of this file. If the file exists, it will lookup file data with a table 'A' and call the web service to update the portal.
If File does not exist it will select all the records from table 'B'.

In either case, if the job completes successfully, it will delete flat file. If any updates fail, it will replace the existing file and write the failed records.

I have got some idead that we could implement this using sequencer job but not sure how to check file whether its present on server or not. Second if job complete successfully how would job delete the existing flat file if any.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do a bit more research.

Checking whether a file exists is most easily done with a Wait For File activity, but can reasonably easily also be done with an Execute Command activity.

Use the $JobStatus activity variable associated with the Job activity to determine whether or not to run an Execute Command activity to delete the file.
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