Computing.Net > Forums > Disk Operating System > DOS Redirect input in batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS Redirect input in batch file

Reply to Message Icon

Name: MichaelLoveUSA
Date: October 8, 2004 at 09:28:44 Pacific
OS: Win2000
CPU/Ram: NA
Comment:

I am trying to run sqlplus commands in a batch file. I want to know if I can use the << command similar to Unix(ksh) or if I have to use < and put my commands in an input file. Here is the code I am trying to run:

sqlplus -s %DBUSER%\%DBPASS%@%DBSERVER% << EOF
delete from normalized_guest_cards_1 where community = '%1%';
commit;
delete from normalized_guest_cards_2 where community = '%1%';
commit;
delete from normalized_lease_data_1 where community = '%1%';
commit;
delete from normalized_lease_data_2 where community = '%1%';
commit;
quit;
EOF



Sponsored Link
Ads by Google

Response Number 1
Name: MichaelLoveUSA
Date: October 8, 2004 at 09:54:41 Pacific
Reply:

Nevermind! I had my slash backwards! Am I unix or am I DOS? That is the question...


0

Response Number 2
Name: MichaelLoveUSA
Date: October 8, 2004 at 09:57:35 Pacific
Reply:

Oops, that only got my connection working. Still an issue. Ideas?


0

Response Number 3
Name: gary henderson
Date: November 3, 2004 at 15:37:45 Pacific
Reply:

I too want to know how to something similar. Perhaps you can help me. I can send ASCII commands to control a device through com1: for instance but how do I get data back to display in DOS? In my case, I am sending a command to a device that is supposed to give me the firmware version it is running. If using Hyperterminal in Windows XP, it comes back as "2.97" which is correct. But in a batch file using DOS, how can I get this response to display while running the batch file? Maybe someone out there has a small program that can send a simple string out of the com port of choice and capture the response for printing?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: DOS Redirect input in batch file

What does the % mean in batch files? www.computing.net/answers/dos/what-does-the-mean-in-batch-files/5925.html

How do u make a batch file that runs whenever the computer boots up www.computing.net/answers/dos/how-do-u-make-a-batch-file-that-runs-whenever-the-computer-boots-up/3744.html

Variables in batch files www.computing.net/answers/dos/variables-in-batch-files/12289.html