Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Problem of Mnespace Change #95

Open
lgoodkin opened this issue Mar 9, 2017 · 8 comments
Open

The Problem of Mnespace Change #95

lgoodkin opened this issue Mar 9, 2017 · 8 comments

Comments

@lgoodkin
Copy link

lgoodkin commented Mar 9, 2017

%SYS > d ^JOBEXAM^%X364

@nikitaeverywhere
Copy link
Member

%SYS > d ^JOBEXAM^%X364

This gives the syntax error.

@nikitaeverywhere
Copy link
Member

But calling this without ^%X364 gives

%SYS > d ^JOBEXAM

<NOLINE>^%X364
╠%X364 ; BINDING FOR ANSI X3.64 NAMESPACE, NOV/92 ; LRS952 06/07/05

Will try to see what's wrong soon. Thanks.

@eduard93
Copy link
Contributor

Seems to fail second line:

set prevspace="^"_$zu(96,12)
u 0::"^%X364"	; Set mnemonic space
u 0::prevspace

@nikitaeverywhere
Copy link
Member

@eduard93, thank you. I just tried this in WebTerminal (just copying and pasting to the prompt), and it worked normally.

@nikitaeverywhere
Copy link
Member

nikitaeverywhere commented Dec 21, 2017

The interesting thing is, WebTerminal changes mnespace after each execution back to WebTerminal's $ZName, as it uses I/O redirects that are not available if mnespace is switched to another one, rather than WebTerminal's mnespace.

That's pretty much the reason why I copied ^%X364 directly to WebTerminal's routine, as ^%X364 is a default mnespace and many routines fail if its functions are not defined.

@nikitaeverywhere
Copy link
Member

nikitaeverywhere commented Dec 21, 2017

Looks like I found the problem. If I write something when the mnemonic space is changed, it fails:

2017-12-21_211800

If I remove w 1 it runs normally.

@nikitaeverywhere nikitaeverywhere changed the title D ^JOBEXAM The Problem of Mnespace Change Dec 21, 2017
@eduard93
Copy link
Contributor

eduard93 commented Dec 21, 2017

This is a write: that get's called
w /cup(1,1)

@nikitaeverywhere
Copy link
Member

nikitaeverywhere commented Dec 21, 2017

Any write won't be successful I think, and the reason is MNespace change within I/O redirection.

This will be successful:

set prevspace="^"_$zu(96,12)
do ##class(%Device).ReDirectIO(0)
u 0::"^%X364" 
w "test" 
u 0::prevspace
do ##class(%Device).ReDirectIO(1)

This will fail:

set prevspace="^"_$zu(96,12)
u 0::"^%X364" 
w "test" 
u 0::prevspace

We need to find the better way to intercept I/O of the Caché process rather than use I/O redirection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants