I want to extract table from Oracle using DSExecute and sqlplus as below:
cmd = "sqlplus -s ":userID:"/":passWD:"@":dbName:" @":sFolder:"\eAccountBilling.sql ":extractDate:" > AccountBilling.txt"
Call DSExecute("NT",cmd,output,rc)
I use one parameter extractDate to pass to sql script file eAccountBilling.sql
In script file, I specify that parameter as &1. When this job runs, the value of the parameter I passed is: 2006-09-30
This job works fine, however, the output file contains the query result and 2 extra lines as:
old 1: select * from ACW.Package a where a.MIS_UPDATE_DATE between trunc(cast('&1' as date) -1) and trunc(cast('&1' as date) -1) + 0.99999
new 1: select * from ACW.Package a where a.MIS_UPDATE_DATE between trunc(cast('2006-09-30' as date) -1) and trunc(cast('2006-09-30' as date) -1) + 0.99999
... query result goes here
Could somebody tell me how to remove those 2 extra lines from the output file? Thank you!
How to remove extra lines in the output file?
Moderators: chulett, rschirm, roy
-
namtrinhthanh
- Participant
- Posts: 3
- Joined: Thu Sep 28, 2006 12:49 am
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
It would appear that you have a switch enabled in your shell that reports argument substitutions. If you can find out what this switch is, disabling it ought to remove the message.
Type CMD /? to find out more about shell switches.
You might also like to try using %1 rather than &1 as the argument placeholder.
It would appear that you have a switch enabled in your shell that reports argument substitutions. If you can find out what this switch is, disabling it ought to remove the message.
Type CMD /? to find out more about shell switches.
You might also like to try using %1 rather than &1 as the argument placeholder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
It would appear that you have a switch enabled in your shell that reports argument substitutions. If you can find out what this switch is, disabling it ought to remove the message.
Type CMD /? to find out more about shell switches.
You might also like to try using %1 rather than &1 as the argument placeholder.
It would appear that you have a switch enabled in your shell that reports argument substitutions. If you can find out what this switch is, disabling it ought to remove the message.
Type CMD /? to find out more about shell switches.
You might also like to try using %1 rather than &1 as the argument placeholder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
namtrinhthanh
- Participant
- Posts: 3
- Joined: Thu Sep 28, 2006 12:49 am
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
namtrinhthanh
- Participant
- Posts: 3
- Joined: Thu Sep 28, 2006 12:49 am
