Search found 18 matches

by bipul049
28 Apr 2014 19:32
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Thank you so much foxidrive. You are just amazing at your work. I will test these things here which I am sure will work flawlessely. If anything , will post it here.
You really are time saver.

Thanks a lot
by bipul049
28 Apr 2014 18:45
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Oh it looks perfectly alright now. Thank you so much Foxidrive for taking out time for me to get this done. I really appreciate that. As of now its working as expected. I will cross check few more test cases and will get back to you for any clarification. Thanks alot alot alot for this. Yes it does ...
by bipul049
28 Apr 2014 18:21
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

I tried running your code Foxidrive. This is what i did: Input file content: REPLICAT ABCDEF Last Started 2014-04-28 16:05 Status RUNNING Description Description here Checkpoint Lag 07:00:00 (updated 00:12:01 ago) Log Read Checkpoint File ./dirdat/rg000260 2014-04-28 16:10:32.812000 RBA 445370 REPLI...
by bipul049
28 Apr 2014 17:41
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Foxidrive, Thanks for trying to help me out. I am very new to batch scripting. If you can tell me where to fit in this code of findrepl in my current code which is running without any issues(the first one I posted today). This code only needs to be modified for status checking and it will work flawl...
by bipul049
28 Apr 2014 17:04
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Hello Foxidrive, Thanks for your prompt response. I will put in here what i am looking for through this implementation. 1. If you see here, 3rd line which is 00:00:00 is normal lag(this can't exceed more than 06:00:00) and then the one inside () is checkpoint lag i.e. 00:00:09 here, cant exceed more...
by bipul049
28 Apr 2014 15:06
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Hi Penpen, I am back. Sorry to disturb you so much, but I NEED TO GET THIS DONE. My requirement is something specified below. 1. My input file(input.txt) contains this: *********************************************************** REPLICAT ABCDEF Last Started 2014-04-28 13:05 Status STOPPED Descriptio...
by bipul049
23 Feb 2014 18:31
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Hello Penpen, As i informed in my earleir post that your code works perfectly as expected. But i have one new requirement here. Whenever my process is stopped for maintenance, then also lag increases and i keep getting n number of mails. I want that if process status is STOPPED then it shouldn't sen...
by bipul049
10 Jul 2013 08:04
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Thanks a lot penpen. This is working exactly the way i wanted. And yes taking the assumptions into consideration is very imp. These assumptions very much comply to the requirements i had.

Thanks a lot for prompt and great response.
by bipul049
10 Jul 2013 04:51
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Hello, Sorry i am very new to batch scripting but i need to accomplish this requirement. As suggested by foxidrive, hereby I have exact requirement.This is my input file(say Input.txt) ***************************Input.txt************************** EXTRACT ABCD2EF Last Started 2013-05-19 05:31 Status...
by bipul049
09 Jul 2013 09:55
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

And one more thing i noticed. If its not able to find the second string in the line, its skipping whatever process names are specified after that. For ex. ****************FILE START***************** Sending request to WINDOWS process ABCD... Running behind by: 8 seconds. Some line here Sending reque...
by bipul049
09 Jul 2013 08:38
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Re: Extracting required columns from the file

Hello penpen The previous reply of yours is working as expected. But i have one issue here. @echo off setlocal enableDelayedExpansion set "INPUT_FILE=file.txt" set "OUTPUT_FILE=out.txt" set STATE=0 set lag_limit=3600 ( for /f "tokens=4,5*" %%a in ('findstr /R /C:"^...
by bipul049
06 Jul 2013 15:01
Forum: DOS Batch Forum
Topic: Extracting required columns from the file
Replies: 27
Views: 20607

Extracting required columns from the file

I am trying to get something out of batch script using FOR,token,findstr. Not getting hang of how can i find 2 strings in a file and concatenate the respective one's together. Here is my requirement. I have a file which consists of these rows: ************FILE START********** Sending request to WIND...
by bipul049
04 Jul 2013 18:10
Forum: DOS Batch Forum
Topic: Fetching specific column from text file using batch file
Replies: 9
Views: 7533

Re: Fetching specific column from text file using batch file

Its working fine now Endoro. You really helped me a lot. Hats off to you for this. This was like hectic requirement for me from last 2-3 days. You resolved it within a snap of finger. Thanks a lot.
by bipul049
04 Jul 2013 16:22
Forum: DOS Batch Forum
Topic: Fetching specific column from text file using batch file
Replies: 9
Views: 7533

Re: Fetching specific column from text file using batch file

I am putting it in Same way. Here is my subscript: @echo off &SETLOCAL ENABLEDELAYEDEXPANSION call:DateToJDN 2013-07-02 JDN5 SET /a JDN5-=2 (FOR /f "tokens=1-5" %%a IN (file.txt) DO ( CALL:DateToJDN %%c jdn IF !jdn! gtr %JDN5% ECHO(%%a %%b %%c %%d %%e ))>file.new goto:eof rem Convert t...
by bipul049
04 Jul 2013 16:01
Forum: DOS Batch Forum
Topic: Fetching specific column from text file using batch file
Replies: 9
Views: 7533

Re: Fetching specific column from text file using batch file

Date format is correct. Endoro i want the records older than 2 days. But your script is giving me records only for 2 days counting from sysdate. what small change i will have to make it work.
Please suggest me on that. Thanks alot