[BR_forum] Creating new files with uppercase filenames

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

[BR_forum] Creating new files with uppercase filenames

Post by Susan Smith »

Hi folks,

Is there a way to get BR to honor the upper/lower case with which I'm naming a new file? I have to submit a file to a county agency and the filename has to be EXACTLY what they indicated, including the case of the filename. No matter what I do, Windows reports the created file as lowercase. I couldn't see an option in BR to change this, and it only affects the longfilename. See below:




Even if I rename the file afterwards (either with EXECUTE "RENAME..." or EXECUTE "SYS RENAME..." the filename stays in lowercase.

At first, I thought that this was just a Windows thing. But if I use EditPadPro to create a new file and "save as" with an uppercase filename, then it STAYS in uppercase in Windows Explorer.

-- Susan
Attachments
moz-screenshot-431.jpg
moz-screenshot-431.jpg (21.23 KiB) Viewed 7926 times
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

[BR_forum] Creating new files with uppercase filenames

Post by John »

You may want to know about:

Config FileNames Mixed_Case

You may also need to know that by default windows is set to display all caps names as all lower case… you can change this from an windows explorer window goto Tools>Folder Options> (somewhere in there I thought – but I couldn’t find the setting on my computer) – someone else – if you know where to change this setting please chime in.

-john


From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:13 PM
To: BR Forum
Subject: [BR_forum] Creating new files with uppercase filenames



Hi folks,

Is there a way to get BR to honor the upper/lower case with which I'm naming a new file? I have to submit a file to a county agency and the filename has to be EXACTLY what they indicated, including the case of the filename. No matter what I do, Windows reports the created file as lowercase. I couldn't see an option in BR to change this, and it only affects the longfilename. See below:




Even if I rename the file afterwards (either with EXECUTE "RENAME..." or EXECUTE "SYS RENAME..." the filename stays in lowercase.

At first, I thought that this was just a Windows thing. But if I use EditPadPro to create a new file and "save as" with an uppercase filename, then it STAYS in uppercase in Windows Explorer.

-- Susan
Attachments
image001.jpg
image001.jpg (21.23 KiB) Viewed 7926 times
John Bowman
George Tisdale

[BR_forum] Creating new files with uppercase filenames

Post by George Tisdale »

Yes, create your file in the normal way then

00100 execute “copy “&yourfilename$&” :PATHFILENAME”

The colon will point to your BR entry location AND tell BR not to mess with the case. For this to work as you want it to the entire path from WB must be in UPPERCASE. : will point to x:WB

OPEN #x:”NAME=:PATHFILENAME.DAT,recl=xxx…….,external,output


George L. Tisdale, CPA
Tisdale CPA
75 Junction Square Drive
Concord, MA 01742
(978) 369-5585


From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:13 PM
To: BR Forum
Subject: [BR_forum] Creating new files with uppercase filenames



Hi folks,

Is there a way to get BR to honor the upper/lower case with which I'm naming a new file? I have to submit a file to a county agency and the filename has to be EXACTLY what they indicated, including the case of the filename. No matter what I do, Windows reports the created file as lowercase. I couldn't see an option in BR to change this, and it only affects the longfilename. See below:




Even if I rename the file afterwards (either with EXECUTE "RENAME..." or EXECUTE "SYS RENAME..." the filename stays in lowercase.

At first, I thought that this was just a Windows thing. But if I use EditPadPro to create a new file and "save as" with an uppercase filename, then it STAYS in uppercase in Windows Explorer.

-- Susan
Attachments
image001.jpg
image001.jpg (21.23 KiB) Viewed 7926 times
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

[BR_forum] Creating new files with uppercase filenames

Post by John »

The windows setting only affects how the filename displays, not how it’s stored. There should be a way to change that setting without regedit.

Filenames mixed_case in your config file will tell BR to respect the case of the filenames you specify in open statements. George’s way conveniently works around this.

-john

From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:49 PM
To: Business Rules Forum
Subject: Re: [BR_forum] Creating new files with uppercase filenames



Hi John,

In Windows XP, there is a registry setting that tells Windows not to change the case when you display files. I don't want to use that because in every OTHER situation, I prefer the lowercase filenames. It's just this one particular file that has to be created in upper case. The other issue with changing it in Windows is that I'd have to do that to every computer at my customer's site (where this file will ultimately be created) and they may not want that registry setting permanent either. Plus, when they replace computers or reinstall OSs, they'd have to remember to reset that registry setting or the submitted file will all of a sudden be rejected when they send it up to the County with the wrong filename case.

In case you're interested, the registry key is
HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion Policies Explorer
There should be a DWORD value (or you create one if it's not there) named DontPrettyPath that tells Explore not to mess with the case when displaying filenames. The value for it should be 1 (or 0 to turn "pretty path" back on)

I see that George has an idea, so I'll go check that out. Thanks for the response. I never thought I'd WANT to see filenames in all upper case again.

-- Susan

we John Bowman wrote:
You may want to know about:

Config FileNames Mixed_Case

You may also need to know that by default windows is set to display all caps names as all lower case… you can change this from an windows explorer window goto Tools>Folder Options> (somewhere in there I thought – but I couldn’t find the setting on my computer) – someone else – if you know where to change this setting please chime in.

-john


From: br_forum-bounces@ads.net (br_forum-bounces@ads.net) [mailto:br_forum-bounces@ads.net (br_forum-bounces@ads.net)] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:13 PM
To: BR Forum
Subject: [BR_forum] Creating new files with uppercase filenames



Hi folks,

Is there a way to get BR to honor the upper/lower case with which I'm naming a new file? I have to submit a file to a county agency and the filename has to be EXACTLY what they indicated, including the case of the filename. No matter what I do, Windows reports the created file as lowercase. I couldn't see an option in BR to change this, and it only affects the longfilename. See below:




Even if I rename the file afterwards (either with EXECUTE "RENAME..." or EXECUTE "SYS RENAME..." the filename stays in lowercase.

At first, I thought that this was just a Windows thing. But if I use EditPadPro to create a new file and "save as" with an uppercase filename, then it STAYS in uppercase in Windows Explorer.

-- Susan
Attachments
image001.jpg
image001.jpg (21.23 KiB) Viewed 7926 times
John Bowman
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

[BR_forum] Creating new files with uppercase filenames

Post by John »

Sounds good to me.

From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 1:51 PM
To: Business Rules Forum
Subject: Re: [BR_forum] Creating new files with uppercase filenames



Oh. Well, I guess I don't know what I'm talking about (surprise, surprise). But at least George's fix works, so I went with that first.

Having said that, I just tested "CONFIG filenames mixed_case" and I see that it works too. If I were to use this solution, I'd need to create a function that will poll STATUS ALL to find out what the original status of "filenames" is before I change it to "mixed case" so that I can set it back to it's original status afterwards. I don't want to mess with any permanent settings either in BR or in Windows, so I'd prefer to reset it after creating the file. Does that seem like a reasonable way to proceed?

-- Susan

John Bowman wrote:
The windows setting only affects how the filename displays, not how it’s stored. There should be a way to change that setting without regedit.

Filenames mixed_case in your config file will tell BR to respect the case of the filenames you specify in open statements. George’s way conveniently works around this.

-john

From: br_forum-bounces@ads.net (br_forum-bounces@ads.net) [mailto:br_forum-bounces@ads.net (br_forum-bounces@ads.net)] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:49 PM
To: Business Rules Forum
Subject: Re: [BR_forum] Creating new files with uppercase filenames



Hi John,

In Windows XP, there is a registry setting that tells Windows not to change the case when you display files. I don't want to use that because in every OTHER situation, I prefer the lowercase filenames. It's just this one particular file that has to be created in upper case. The other issue with changing it in Windows is that I'd have to do that to every computer at my customer's site (where this file will ultimately be created) and they may not want that registry setting permanent either. Plus, when they replace computers or reinstall OSs, they'd have to remember to reset that registry setting or the submitted file will all of a sudden be rejected when they send it up to the County with the wrong filename case.

In case you're interested, the registry key is
HKEY_CURRENT_USER Software Microsoft Windows CurrentVersion Policies Explorer
There should be a DWORD value (or you create one if it's not there) named DontPrettyPath that tells Explore not to mess with the case when displaying filenames. The value for it should be 1 (or 0 to turn "pretty path" back on)

I see that George has an idea, so I'll go check that out. Thanks for the response. I never thought I'd WANT to see filenames in all upper case again.

-- Susan

we John Bowman wrote:
You may want to know about:

Config FileNames Mixed_Case

You may also need to know that by default windows is set to display all caps names as all lower case… you can change this from an windows explorer window goto Tools>Folder Options> (somewhere in there I thought – but I couldn’t find the setting on my computer) – someone else – if you know where to change this setting please chime in.

-john


From: br_forum-bounces@ads.net (br_forum-bounces@ads.net) [mailto:br_forum-bounces@ads.net (br_forum-bounces@ads.net)] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 12:13 PM
To: BR Forum
Subject: [BR_forum] Creating new files with uppercase filenames



Hi folks,

Is there a way to get BR to honor the upper/lower case with which I'm naming a new file? I have to submit a file to a county agency and the filename has to be EXACTLY what they indicated, including the case of the filename. No matter what I do, Windows reports the created file as lowercase. I couldn't see an option in BR to change this, and it only affects the longfilename. See below:




Even if I rename the file afterwards (either with EXECUTE "RENAME..." or EXECUTE "SYS RENAME..." the filename stays in lowercase.

At first, I thought that this was just a Windows thing. But if I use EditPadPro to create a new file and "save as" with an uppercase filename, then it STAYS in uppercase in Windows Explorer.

-- Susan
Attachments
image001.jpg
image001.jpg (21.23 KiB) Viewed 7926 times
John Bowman
Joe Nichols

[BR_forum] Creating new files with uppercase filenames

Post by Joe Nichols »

Susan,

Just to clarify what John said, BR defaults to "lower case" for all platforms, so unless you are changing FILENAMES in your BRconfig.sys file or with one of your programs then you can have a CONFIG before the open and one after to change from lower case to upper case and then back to lower case. This would avoid having to copy the file.

Here's the release notes on Config Filenames:

"Version 3.9 will support long filenames with a variety of alternatives with respect to case sensitivity. Unix defaults to case sensitive, and DOS/Windows defaults to case insensitive. Business Rules! defaults to lower case on all platforms, unless overridden by a FILENAMES configuration statement. This new WBCONFIG.SYS statement controls the appearance of newly created files:

FILENAMES UPPER_CASE | LOWER_CASE | MIXED_CASE [SEARCH]

Mixed case uses the NAME= string unmodified, and permits searching only on Unix when no case sensitive match is found. Other platforms ignore the SEARCH keyword."


Joe Nichols



Susan Smith wrote:
Oh. Well, I guess I don't know what I'm talking about (surprise, surprise). But at least George's fix works, so I went with that first.

Having said that, I just tested "CONFIG filenames mixed_case" and I see that it works too. If I were to use this solution, I'd need to create a function that will poll STATUS ALL to find out what the original status of "filenames" is before I change it to "mixed case" so that I can set it back to it's original status afterwards. I don't want to mess with any permanent settings either in BR or in Windows, so I'd prefer to reset it after creating the file. Does that seem like a reasonable way to proceed?

-- Susan
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

[BR_forum] Creating new files with uppercase filenames

Post by Susan Smith »

Thanks for that clarification Joe. Then I can assume that after I "CONFIG filenames Mixed_Case" and create my uppercase-named file, I can "CONFIG filenames lower_case" to set it back. I'm certain that nowhere else in my BR programs do I change this setting, so I can be assured that going back to lower case is the right move.

Thanks. That saved me some additional programming time to poll the "before" setting.

-- Susan


Joe Nichols wrote:
Susan,

Just to clarify what John said, BR defaults to "lower case" for all platforms, so unless you are changing FILENAMES in your BRconfig.sys file or with one of your programs then you can have a CONFIG before the open and one after to change from lower case to upper case and then back to lower case. This would avoid having to copy the file.

Here's the release notes on Config Filenames:

"Version 3.9 will support long filenames with a variety of alternatives with respect to case sensitivity. Unix defaults to case sensitive, and DOS/Windows defaults to case insensitive. Business Rules! defaults to lower case on all platforms, unless overridden by a FILENAMES configuration statement. This new WBCONFIG.SYS statement controls the appearance of newly created files:

FILENAMES UPPER_CASE | LOWER_CASE | MIXED_CASE [SEARCH]

Mixed case uses the NAME= string unmodified, and permits searching only on Unix when no case sensitive match is found. Other platforms ignore the SEARCH keyword."


Joe Nichols



Susan Smith wrote:
Oh. Well, I guess I don't know what I'm talking about (surprise, surprise). But at least George's fix works, so I went with that first.

Having said that, I just tested "CONFIG filenames mixed_case" and I see that it works too. If I were to use this solution, I'd need to create a function that will poll STATUS ALL to find out what the original status of "filenames" is before I change it to "mixed case" so that I can set it back to it's original status afterwards. I don't want to mess with any permanent settings either in BR or in Windows, so I'd prefer to reset it after creating the file. Does that seem like a reasonable way to proceed?

-- Susan
George Tisdale

[BR_forum] Creating new files with uppercase filenames

Post by George Tisdale »

Just for clarification:

The reason that I use the COPY command is that the UPPERCASE file that I create is a mandated file name for ACH transfers. Every transfer is done with the same file name. However, when I create the transfer file I do it using an increasing serial number for the file (such as ach00150.dat) so that I maintain a history of all transfers. The serialized file is then copied to the transfer file name in the appropriate directory if the transfer file does not exist. If it does exist then the routine branches because the last upload has not been completed (the FTP transfer automatically deletes the transfer file after successful upload). A successful upload is the only way short of manual deletion that the transfer file is deleted.

George L. Tisdale, CPA
Tisdale CPA
75 Junction Square Drive
Concord, MA 01742
(978) 369-5585


From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Susan Smith
Sent: Tuesday, May 26, 2009 2:27 PM
To: Business Rules Forum
Subject: Re: [BR_forum] Creating new files with uppercase filenames



Thanks for that clarification Joe. Then I can assume that after I "CONFIG filenames Mixed_Case" and create my uppercase-named file, I can "CONFIG filenames lower_case" to set it back. I'm certain that nowhere else in my BR programs do I change this setting, so I can be assured that going back to lower case is the right move.

Thanks. That saved me some additional programming time to poll the "before" setting.

-- Susan


Joe Nichols wrote:
Susan,

Just to clarify what John said, BR defaults to "lower case" for all platforms, so unless you are changing FILENAMES in your BRconfig.sys file or with one of your programs then you can have a CONFIG before the open and one after to change from lower case to upper case and then back to lower case. This would avoid having to copy the file.

Here's the release notes on Config Filenames:

"Version 3.9 will support long filenames with a variety of alternatives with respect to case sensitivity. Unix defaults to case sensitive, and DOS/Windows defaults to case insensitive. Business Rules! defaults to lower case on all platforms, unless overridden by a FILENAMES configuration statement. This new WBCONFIG.SYS statement controls the appearance of newly created files:

FILENAMES UPPER_CASE | LOWER_CASE | MIXED_CASE [SEARCH]

Mixed case uses the NAME= string unmodified, and permits searching only on Unix when no case sensitive match is found. Other platforms ignore the SEARCH keyword."


Joe Nichols



Susan Smith wrote:
Oh. Well, I guess I don't know what I'm talking about (surprise, surprise). But at least George's fix works, so I went with that first.

Having said that, I just tested "CONFIG filenames mixed_case" and I see that it works too. If I were to use this solution, I'd need to create a function that will poll STATUS ALL to find out what the original status of "filenames" is before I change it to "mixed case" so that I can set it back to it's original status afterwards. I don't want to mess with any permanent settings either in BR or in Windows, so I'd prefer to reset it after creating the file. Does that seem like a reasonable way to proceed?

-- Susan
Post Reply