Getting NAME ERR when I save program raw files

Discussion about the new DM41X calculator
HPMike
Posts: 209
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: Getting NAME ERR when I save program raw files

Post by HPMike » Wed Oct 14, 2020 5:26 am

Duplicate post - sorry
Last edited by HPMike on Wed Oct 14, 2020 2:40 pm, edited 5 times in total.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973.

User avatar
PierreMengisen
Posts: 118
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

Re: Getting NAME ERR when I save program raw files

Post by PierreMengisen » Wed Oct 14, 2020 12:58 pm

Hi BOB
I have detected two situations that generate the problem "NAME ERR".

a) no program in the program editor and the alpha register without correspondence with an existing label.

b) an active program in the editor and a name that does not match the program label.

Hoping to help solve the problem, greetings to the whole team.
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]

rprosperi
Posts: 989
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Getting NAME ERR when I save program raw files

Post by rprosperi » Wed Oct 14, 2020 3:19 pm

Thanks for these updates.

About Folders: There is no need to create folders manually; if the 41X needs to write files to a folder, it will properly create the folder as needed.

About state files: Yes it is feasible for a state file to be corrupt and restoring it could bring a problem back to a 'fixed' system, so it's best to not do that, assuming you know of course. Most often you don't know and the very act of restoring a state file leading to a problem can be the way such corrupted state file problems are identified.

@PierreMengisen - Thanks for these hints, we'll try to reproduce this and get back to you.
--bob p

DM42: β00071 & 00282, DM41X: β00071, DM10L: 071/100

rprosperi
Posts: 989
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Getting NAME ERR when I save program raw files

Post by rprosperi » Wed Oct 14, 2020 4:35 pm

Pierre has provided the hints that have allowed this small mystery to be resolved, I think.

I mistakenly assumed folks using this feature were familiar with the 41CX SAVEP command (for saving files to Ext Mem) as this error is from the analogous "Save RAW Program" feature in the 41X, and that they had ruled out the 'normal' causes of this error message, but I now suspect that the issue is simply not understanding how SAVEP works. While the 41X manual does make explicit reference to being "...equivalent to SAVEP..." the manual should be clarified to convey that arguments, errors, etc. are all patterned after SAVEP's behavior.

To clarify some points, possibly being misunderstood:

1. The name you provide in Alpha prior to invoking "Save RAW Program" is to specify which existing FOCAL program name (the Global label closest to the top of the program) to save, and not the filename you want to save it to. That FOCAL program is then saved to a .raw file with the filename you specify.

a. If there is no FOCAL program with the name specified in Alpha, then you will see the "NAME ERR" message, to tell you there is no FOCAL program with that name, and then a zero byte file with the name you specified is created. (We'll explore if this empty file creation should/can be avoided)

b. If Alpha is empty, the current FOCAL program (that PRGM is currently in) with the name you specified is created; this file is never zero bytes, as even an apparenlty 'empty' program does contain some bytes

So, "NAME ERR" is basically just telling you that the program you told it to save does not exist, and the zero byte files are the result of saving 'nothing' to a file specified in the save process.

This also explains why following the steps I provided last night worked properly, as each file was correctly specified.

So, could all the users that have experienced this error please try again, being sure to specify an existing FOCAL program name, and report results, both to confirm if this resolves the issue, or not.

Thanks for the hint Pierre!! :)
--bob p

DM42: β00071 & 00282, DM41X: β00071, DM10L: 071/100

HPMike
Posts: 209
Joined: Fri Jul 21, 2017 11:01 pm
Location: DFW, Texas

Re: Getting NAME ERR when I save program raw files

Post by HPMike » Wed Oct 14, 2020 5:04 pm

Bob, my experience is that once this problem occurs, it will continue to occur regardless of what program you choose to save or how you do it, until you reset the calculator and start again with cleared memory. This morning I wrote and successfully saved multiple programs, including programs with filenames that were different from the global label at the beginning of the program. I then attempted to save a module program, and got the NAME ERR message. I tried to resave another program that had worked previously, and again got the same error. Reset the calculator, and now it works again. Reloaded a good state file, and it still works. So one thing I think we can agree on is that once this problem occurs, regardless of the cause, memory is corrupt and a calculator reset is required. And any state files that were created after the occurance of this error will be corrupt as well.

Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.
DM15L, S/N 00548. DM42, SN: 00159. DM41X, SN: 00973.

User avatar
PierreMengisen
Posts: 118
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

Re: Getting NAME ERR when I save program raw files

Post by PierreMengisen » Wed Oct 14, 2020 5:40 pm

rprosperi wrote:
Wed Oct 14, 2020 4:35 pm

1. The name you provide in Alpha prior to invoking "Save RAW Program" is to specify which existing FOCAL program name (the Global label closest to the top of the program) to save, and not the filename you want to save it to. That FOCAL program is then saved to a .raw file with the filename you specify.

a. If there is no FOCAL program with the name specified in Alpha, then you will see the "NAME ERR" message, to tell you there is no FOCAL program with that name, and then a zero byte file with the name you specified is created. (We'll explore if this empty file creation should/can be avoided)

b. If Alpha is empty, the current FOCAL program (that PRGM is currently in) with the name you specified is created; this file is never zero bytes, as even an apparenlty 'empty' program does contain some bytes
All this seems to me to be very clearly expressed. Thank you BOB for articulating it in this forum. These points 1. a. and b. should be added to the DM42 user manual. It's worth it.

Regards
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]

Peet
Posts: 20
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

Re: Getting NAME ERR when I save program raw files

Post by Peet » Wed Oct 14, 2020 5:41 pm

HPMike wrote:
Wed Oct 14, 2020 5:04 pm
Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.
So do I, because the terminology can create misunderstandings.
There is:

FAT-Filename i.e. calendar.raw
PRG Label i.e. LBL "CAL"
Alpha Register i.e. Monday
The Name that Save RAW asks.

But what means: FOCAL program with the name specified in Alpha?
Past: HP41CV, HP28S, HP11C - Current: HP35S, HP48G+, DM41X

rprosperi
Posts: 989
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Getting NAME ERR when I save program raw files

Post by rprosperi » Wed Oct 14, 2020 5:41 pm

You cannot save a module program, even if it's FOCAL, directly from ROM, however you can copy it from ROM to RAM, and once it's in RAM (user program space) then save it as RAW in the normal way.

The example I wrote last night is exactly what you want, right? You followed it and it worked.

And examples of what does work are not really so helpful, since they do and should work. What is needed, if indeed there is a bug to find, is a keystroke-by-keystroke example, from a known pristine state of a save sequence that does not behave correctly. Discard all your saved known bad / possibly bad saved files to prevent them from polluting your test environment and only work with new files, created and saved using the proper procedures. I don't think you'll encounter it again.

After recreating the NAME ERR error message an hour ago (done by not specifying a valid program name) I am able to create new programs and save them without any problems.
--bob p

DM42: β00071 & 00282, DM41X: β00071, DM10L: 071/100

rprosperi
Posts: 989
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: Getting NAME ERR when I save program raw files

Post by rprosperi » Wed Oct 14, 2020 5:56 pm

Peet wrote:
Wed Oct 14, 2020 5:41 pm
HPMike wrote:
Wed Oct 14, 2020 5:04 pm
Again, I’d appreciate if you’d provide us all with a step-by-step, keystroke-by-keystroke display of how YOU think .raw file saving to the FAT disk should/does take place. Thanks.
So do I, because the terminology can create misunderstandings.
There is:

FAT-Filename i.e. calendar.raw
PRG Label i.e. LBL "CAL"
Alpha Register i.e. Monday
The Name that Save RAW asks.

But what means: FOCAL program with the name specified in Alpha?
FOCAL program means the program you want to save to RAW (FOCAL means User Program language)

In your example, if you want to save the program with LBL "CAL", to a new RAW file named "calendar.raw", do this:

1. Start in Calculator mode (i.e. not PRGM mode)
2. [alpha] [C] [A] [L] [alpha] (to put CAL into Alpha)
3. [cst] [4] (which is shortcut for [shift] [SETUP] [1] [4]) to start Save function
4. Press ENTER (to select New File)
5. type in the name: calendar
6. press [r/s] to confirm

The old contents of Alpha (it appears it was "Monday") does not matter.
--bob p

DM42: β00071 & 00282, DM41X: β00071, DM10L: 071/100

Peet
Posts: 20
Joined: Tue Sep 29, 2020 12:01 am
Location: Germany

Re: Getting NAME ERR when I save program raw files

Post by Peet » Wed Oct 14, 2020 7:06 pm

Tried it in this way with two different PRG as <new file> and it works.
I was referring NAME ERR to a wrong name for the raw file. I never had the idea to put a LBL-Name in Alpha.
Past: HP41CV, HP28S, HP11C - Current: HP35S, HP48G+, DM41X

Post Reply