Search found 30 matches
- 14 Oct 2014 22:29
- Forum: DOS Batch Forum
- Topic: How to trim spaces
- Replies: 2
- Views: 2577
Re: How to trim spaces
My problem got solved after placing parameters and values in quotes. Thanks for the help
- 14 Oct 2014 16:58
- Forum: DOS Batch Forum
- Topic: How to trim spaces
- Replies: 2
- Views: 2577
How to trim spaces
Hi All, I have a below script bat script "Release_10142014_jobImplist.txtImport" which writes into a log file. But when I execute the script its aborting with spaces in the log file name . How to trim spaces. Log file name with spaces script is genearating after execution Release_10142014_...
- 13 Oct 2014 20:49
- Forum: DOS Batch Forum
- Topic: How to pass command from one bat file to another bat file
- Replies: 4
- Views: 3609
Re: How to pass command from one bat file to another bat fil
Thank you it worked
- 13 Oct 2014 19:41
- Forum: DOS Batch Forum
- Topic: How to pass command from one bat file to another bat file
- Replies: 4
- Views: 3609
Re: How to pass command from one bat file to another bat fil
file2.bat Contains
set filename=file1
But needs below command in file2.bat
set filename=%~n0
Thanks,
Somaraju
set filename=file1
But needs below command in file2.bat
set filename=%~n0
Thanks,
Somaraju
- 13 Oct 2014 17:42
- Forum: DOS Batch Forum
- Topic: How to pass command from one bat file to another bat file
- Replies: 4
- Views: 3609
How to pass command from one bat file to another bat file
Hi all, I want to pass the parameter from file1.bat to file2.bat echo set filename=%~n0 >> file2.bat But when I do the above echo statement and writes to a file2.bat, the command is executed and giving the file name, but I need set filename=%~n0 in file2.bat and not the command output. Is there a wa...
- 27 Jun 2013 13:29
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Hi, I corrected all the bugs in the code by using your valuable suggestions. As I said I'm having problem in deleting the files from Current directory once my dscompile function is successfully completed for all the jobs I need to delete the files, but below code is jumping in to the delete function...
- 27 Jun 2013 12:10
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
GNU sed is working as mentioned by foxidrive in one of his post . sed -e "/BEGIN DSJOB/,/Identifier/!d" -e "/BEGIN DSJOB/d" -e "s/^ *Identifier *//" -e "s/\x22//g" *.dsx > %basedirname%%Currentdir%%filename%_dsjoblist_tmp.txt Now I have one more problem. I hav...
- 27 Jun 2013 09:31
- Forum: DOS Batch Forum
- Topic: How to search and get the values from the file
- Replies: 26
- Views: 17122
Re: How to search and get the values from the file
Hi foxidrive, I'm testing your command @echo off sed -e "/BEGIN DSJOB/,/Identifier/!d" -e "/BEGIN DSJOB/d" -e "s/^ *Identifier *//" -e "s/\x22//g" Test_jobs.txt >found.txt I'm getting output in double quotes like below "CopyOfpxHmkEciPrcssDtExtr" &qu...
- 26 Jun 2013 22:02
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Hi Foxidrive, Below is the message I'm getting if I use find command H:\Data\Dir\Datastage>type H:\Data\Dir\Datastage\Current\*.dsx | repl "^(BEGIN DSJOB)\r?\n" "$1" m | find "BEGIN DSJOB Identifier" | repl ".*\x22(.*)\x22 .*" $1 1>H:\Data\Dir\Datastage\Curren...
- 26 Jun 2013 19:54
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Hi, I changed the code to see exactly where the error is occuring. What I see is I'm getting messages saying string is too long H:\Data\Dir\Datastage>IF C == C GOTO dscompile H:\Data\Dir\Datastage>type H:\Data\Dir\Datastage\Current\*.dsx | repl "^(BEGIN DSJOB)\r?\n" "$1" m | find...
- 26 Jun 2013 18:28
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Thank you, I turned on echo on. This is what I see and it is not showing where the error is H:\Data\Dir\Datastage\Current>("C:\IBM\InformationServer\Clients\Classic\dscmdim port.exe" /D=INFETLD01:9080 /H=INFETLD01 /U=o99in44 /P=Snail123 CPT_DEV H:\Dat a\Dir\Datastage\Current\PHP_Jobs.dsx 1...
- 26 Jun 2013 17:58
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Hi Squashman, Thanks for correcting my mistakes. I corrected my code according to your feedback. I also added error handling after the for loop to exit the script if there are any errors, but I'm getting below error H:\Data\Dir\Datastage>echo off The syntax of the command is incorrect. :: ==========...
- 26 Jun 2013 15:22
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Hi Squashman, I think we posted messages on same time and your message is few minutes ahead of mine. Here is my latest code, and I did modify according to your comments, thanks for helping me and this working now. :: ====================Written by Somaraju Buddharaju=================================...
- 26 Jun 2013 15:07
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
Re: for loop to trigger commands for each .dsx file
Squashman, I have taken your advice from previous post. I'm modifying the code and I sent you the old code that I have in other file. Here is the latest code with the changes you mentioned in the previous post. :: ====================Written by Somaraju Buddharaju====================================...
- 26 Jun 2013 14:37
- Forum: DOS Batch Forum
- Topic: for loop to trigger commands for each .dsx file
- Replies: 23
- Views: 15853
for loop to trigger commands for each .dsx file
Hi, I'm trying to execute couple of commands for a particular file extensions in a for loop. For loop is not working properly in below script, sometimes it is triggering below commands properly for the two files ECI_Jobs.dsx,PHP_Jobs.dsx and sometimes its triggering the commands twice for the same f...