Script to generate a text file

Everything about Control-M Server installation or setup.
Post Reply
Nancy

Script to generate a text file

Post by Nancy » 11 Mar 2009 8:26

Hi,
Can we have a script for the following command to be executed in Commandline to generate a text file?

SQLCMD -S UKSOKDWDBDV01\ATP -d KALDIW_DV -o C:\temp\sql.out -Q "SELECT run_command FROM dbo.VW_PROCESS_CONTROL WHERE run_task_name = 'Load Product'" -h -1 -W

Regards,
Saroj

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 11 Mar 2009 8:34

Hi

Of course you can, depending on which operating system.

Nancy

Post by Nancy » 11 Mar 2009 9:22

It's in WIndows Operating system.
Can you please give me the script?

Regards,
Saroj

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 11 Mar 2009 10:58

Hi

First example :
1- Create a text file "sql.txt" containing :
SELECT run_command FROM dbo.VW_PROCESS_CONTROL WHERE run_task_name = 'Load Product'
If you use SYBASE add go the line after.

2- Create a bat file "sql.bat" containing :
SQLCMD -S UKSOKDWDBDV01\ATP -d KALDIW_DV -o C:\temp\sql.out -i sql.txt -h -1 -W

and launch sql.bat.

or
Create simply sql.bat with your complete request.

Nancy

Post by Nancy » 12 Mar 2009 6:21

Many thanks Fyot.

Hoever, can you please let me know some of the guides or reference manuals where I can get some knowledge about scripts?

Regards,
nanacy

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 13 Mar 2009 9:28

Nancy

There are a lot of web site speaking about scripts under Windows or Unix.

scheduler-usage is dedicated about how to use those scripts in Control-M scheduler. It purpose scripts to manage Control-M components, and some technical solutions, but it isn't a site dedicated to scripts developments.

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 16 Mar 2009 3:05

good luck

Post Reply