Page 1 of 1

Appending records to a seq file from BASIC

Posted: Tue May 06, 2003 8:34 pm
by gpbarsky
Hi.

I have two questions.

1) From a BASIC program, how can I do to append records to a sequential file ? The idea is to not override the existing records, and to write records at after the last record.

2) How can I invoke the "dsjob" program ? I put the dsjob invocation within a .bat file, but I got a message telling me that a "controller was not found". What is wrong ?

Thanks, and Have great days...
[8)]

Posted: Tue May 06, 2003 10:30 pm
by chulett
1) Technically, you could loop thru and read all of the records to get yourself positioned at EOF or you could jump there by using SEEK. Its syntax is documented in the DataStage BASIC Guide.

2) I'm guessing it's not in your PATH. Either add it or try specifying the full path to the executable. Does it work outside of a batch file?

-craig

Posted: Wed May 07, 2003 6:49 am
by gpbarsky
[:)] Thanks Craig for your answer. I will try with SEEK.

The thing with point (2) is that the program is found because it is prefixed with the whole path.

But when executing the command, something is not present at that moment.

By example, if I make a routine within DataStage that invokes by means of DSExecute command the .bat that I built, it works fine. No error messages are produced. But when I double click on the .bat of the server, it gives the "controller not found" message.

Do you know what's wrong ?

And thanks again.

Posted: Wed May 07, 2003 3:46 pm
by ray.wurlod
"Controller not found" usually indicates that the job believes that it has been requested to run under control of another program (for example a job control routine), but that that other program cannot be found.
Try re-compiling the job, then invoking it from dsjob again.
Also verify that everything dsjob needs is being supplied in the BAT file.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518