Search found 541 matches

by SIMMS7400
22 Dec 2020 14:30
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10448

Re: JREPL Usage - read text file with commas and replace empty value

HI Dave -

Thank you, just wanted to confirm there wasn't another switch I was missing. THanks again!!
by SIMMS7400
21 Dec 2020 15:02
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10448

Re: JREPL Usage - read text file with commas and replace empty value

HI Dave -

Is there a way to prevent that empty file creation if no altered lines are detected? Or do I just need to have another line of code to delete the empty file?

Thanks!
by SIMMS7400
19 Dec 2020 10:53
Forum: DOS Batch Forum
Topic: forfiles used with echo modifiying date modified?
Replies: 1
Views: 2454

forfiles used with echo modifiying date modified?

Hi Folks - I'm trying to use forfiles logic to echo the content that meets the specified criteria which I want to leverage in a logfile. I then want to have a second forfiles setup to actually delete that content. However, the first forfiles seems to be changing the date modified. Is there a way to ...
by SIMMS7400
18 Dec 2020 05:14
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10448

Re: JREPL Usage - read text file with commas and replace empty value

Dave - One thing I noticed is the syntax to spool to a "temp" file when NULL/empty values are found is working. But it's also creating an empty file if no matches are found. Here is my syntax: CALL "%UTILPATH%Batch\JREPL" "\|\s*$" "| " /A /exc 1 /f "%FDMEE_BIN%%DATAFILENAME%" /o "%FDMEE_BIN%%ERR_FIL...
by SIMMS7400
17 Dec 2020 09:47
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10448

Re: JREPL Usage - read text file with commas and replace empty value

Hi Dave -

Thank you so much!! Both are working like a charm!

One question, is there a way to use JREPL to pull out the rows with NULL/empty strings in the 18th position and spool them to a "temp" file first before we replace with ERROR?

Thank you!
by SIMMS7400
17 Dec 2020 02:18
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10448

JREPL Usage - read text file with commas and replace empty value

Hello Folks - I use JREPL for quite a few routines and it works wonderfully! I'm having a little trouble with a new business requirement and was wondering if you could help? I have a text file that is PIPE delimited however some of the values have commas which as you know, pose a problem. The text f...
by SIMMS7400
14 Sep 2020 04:18
Forum: DOS Batch Forum
Topic: File/Folder Purging - Best practice?
Replies: 1
Views: 6781

File/Folder Purging - Best practice?

Hi Folks - I'm trying to developing a purging process but I haven't been able to land on anything that I really like yet so wanted to get your opinion. What is the best way to go about this? Can I merely just use a forfiles to remove an entire directory based on AGE, or should I remove files first a...
by SIMMS7400
10 Aug 2020 18:01
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

Here are the results: Atonio's Solution Start Time : 19:54:44.36 End Time : 19:56:33.82 Shadow's Solution Start Time : 19:57:22.91 End Time : 19:58:54.68 File Size : 797761 lines I stand corrected, Shadow's solution is quicker! My apologies for the incorrect message earlier, I was trying to time thi...
by SIMMS7400
10 Aug 2020 17:35
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

Hello Gents -

With a file of about 700k lines, Antonio's solution is about 30 seconds faster. Pretty significant difference, but both are still unbelieveavly quick.

Thank you again to you both for these solutions!!
by SIMMS7400
10 Aug 2020 04:13
Forum: DOS Batch Forum
Topic: Purge Function - best way?
Replies: 1
Views: 2451

Purge Function - best way?

Hi Folks - One can read for hours and hours online about the best way to purge files and folders (and sub directories). Everyone seems to have their own iteration. This is what I came up with. Essentially, a path (less the trailing "\" is passed to a function and then I run a FORFILES over it to rem...
by SIMMS7400
10 Aug 2020 04:10
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

WOW! I'm going to play around with these solutions and see what works best.

It looks like Shadow's and Atonio's solution are comparable? I forgot how fast Shadow's code ran so i will need to do some runs times...
by SIMMS7400
04 Aug 2020 12:45
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

Hi both -

I do need token 1 as I do want to extract the year, but this runs is such quick time anymore, keeping that in make little difference.

Absolutely incredible performance gains on this, thank you Shadow!!! Very much appreciated!
by SIMMS7400
04 Aug 2020 12:03
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

Shadow -

Awesome, that's exactly what I did and it's working great. Thank you! Just for my own curiosity, what's the advantage of the SET /A logic vs the previous way of just listing out the different arrays other than a smaller block of code? Any performance increases?
by SIMMS7400
04 Aug 2020 10:13
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Re: Performance Issues with Code

Shadow - Holy Shit** - this is an incredible performance increase!!! It just took a process from ~2 hours down to 8 seconds, wow! Thank you! One thing is, I copied your code before you made your second edit, adding the SET /A logic. Prior to your edit, "Jan" in the file was returning as "01" which i...
by SIMMS7400
04 Aug 2020 07:41
Forum: DOS Batch Forum
Topic: Performance Issues with Code
Replies: 22
Views: 13652

Performance Issues with Code

Hi Folks - A few months back, Atonio helped me with a chunk of code that determined "min" and "max" month in a data file. I expanded it a bit more to except months in the following formats: 1,01,Jan and January It's working fine. However, performance is not so great. 1600 lines takes a few minutes t...