Page 1 of 1

Exec DOS questions

Posted: Thu Jul 14, 2005 2:53 pm
by snassimr
Hi everybody !!!

If I can to execute DOS script containing some rows of code with DSExecute function and how to concenate the rows ?

Posted: Thu Jul 14, 2005 8:49 pm
by ray.wurlod
Use DSExecute with the first (Shell) argument set to "DOS".
The third argument contains the output. All of the output, with each line returned as a field in a dynamic array.

Posted: Sun Jul 17, 2005 2:52 am
by snassimr
I asked about input DOS line . It contains for rows of code :

open 23.23.23
user ert ert
quote rcmd

It just a sample . I want to send all of these comand with one DSExecute and get one output.

The qiestion is how to send some commands with DSExecute ?

Posted: Sun Jul 17, 2005 2:59 am
by elavenil
Write a batch file, which would have all the codes required for and execute the batch file using DSExecute.

HTWH.

Regards
Saravanan

Posted: Sun Jul 17, 2005 3:18 am
by snassimr
I want to do it without batch file

Posted: Sun Jul 17, 2005 4:44 am
by Sainath.Srinivasan
Why can't you use a batch file? A solution given in this site is based upon the information you provide.

Posted: Sun Jul 17, 2005 4:59 am
by roy
Hi,
You might be able to do it with the ftp stage using the telnet options.
Beyond that why are you relactant to use a batch? (you can build it on hte fly using a ds job if that is what your worried about.

IHTH,

Posted: Sun Jul 17, 2005 5:19 am
by kerensho
Hello,

You have two options:
1. a batch file
2. a routine

if you'll need to write multiple lines in the ExecSH often, I suggest write a generic routine that gets all the code as one string parameter with a delimiter between the lines. in the routine open a loop that reads and executes field by field (ie line by line).

good luck,
Keren

Posted: Sun Jul 17, 2005 5:37 am
by snassimr
(you can build it on hte fly using a ds job if that is what your worried about.

How ?

I dont approved to put bat files on server of my source.
I need to use only DS tools . How I can to build somthing that the result is exactly from running bat file.

Posted: Sun Jul 17, 2005 5:48 am
by elavenil
As Keren mentioned, you can have all the statements in a sequential file, you can read the sequential to get the command and gets executed using DSExecute.

You need to read this file and execute this statement in the loop.

HTWH.

Regards
Saravanan

Posted: Sun Jul 17, 2005 5:51 am
by snassimr
If I can to concenate the commands ?

Posted: Mon Jul 18, 2005 12:05 am
by ray.wurlod
Yes, with field marks (@FM) between them. In this way you have constructed a dynamic array, in which each element will be interpreted as a separate line by the shell.