SH command <NAMEADD> error

10 views
Skip to first unread message

Joshua Barney

unread,
Jun 12, 2013, 9:43:30 AM6/12/13
to InterSy...@googlegroups.com
I am trying to figure out why I am getting a <NAMEADD> error on only one system using this comment
SH ECHO Y | c:\WINSCP.COM /command "option confirm off" "open ftps:username:pass...@ftp.ftpserver.com -explicitssl -certificate="some certificate here"" "get transactions*.csv C:\CLEARGAGEIN\MRI\" "exit"
It is working on 6 of 7 servers, the 7th server will not accept ECHO y |, command works without it

Edward Clark

unread,
Jun 12, 2013, 9:51:25 AM6/12/13
to InterSy...@googlegroups.com
Is it the exact same command on all systems, or does it vary in length? The <NAMEADD> error suggests that the command is too long to be processed.
Instead of the SH command, try using the mvbasic PCPERFORM statement. You can run it from the mv shell with the semicolon command:
 
;PCPERFORM 'ECHO Y | c:\WINSCP.COM /command "option confirm off" "open ftps:username:pass...@ftp.ftpserver.com -explicitssl -certificate="some certificate here"" "get transactions*.csv C:\CLEARGAGEIN\MRI\" "exit"'
 
 


From: InterSy...@googlegroups.com [mailto:InterSy...@googlegroups.com] On Behalf Of Joshua Barney
Sent: Wednesday, June 12, 2013 9:44 AM
To: InterSy...@googlegroups.com
Subject: [InterSystems-MV] SH command <NAMEADD> error

I am trying to figure out why I am getting a <NAMEADD> error on only one system using this comment
SH ECHO Y | c:\WINSCP.COM /command "option confirm off" "open ftps:username:pass...@ftp.ftpserver.com -explicitssl -certificate="some certificate here"" "get transactions*.csv C:\CLEARGAGEIN\MRI\" "exit"
It is working on 6 of 7 servers, the 7th server will not accept ECHO y |, command works without it

--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To post to this group, send email to Cac...@googlegroups.com
To unsubscribe from this group, send email to CacheMV-u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to InterSystems-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Josh Barney

unread,
Jun 12, 2013, 9:52:16 AM6/12/13
to InterSy...@googlegroups.com

It is the same on all systems

Josh Barney

unread,
Jun 12, 2013, 9:54:03 AM6/12/13
to InterSy...@googlegroups.com

And to make it even stranger I have a mv command later in the same program that very similar but works with ECHO

 

From: Edward Clark [mailto:Edward...@intersystems.com]

Sent: Wednesday, June 12, 2013 9:51 AM
To: InterSy...@googlegroups.com

Josh Barney

unread,
Jun 12, 2013, 9:55:00 AM6/12/13
to InterSy...@googlegroups.com

same error with PCPERFORM

 

From: Edward Clark [mailto:Edward...@intersystems.com]

Sent: Wednesday, June 12, 2013 9:51 AM
To: InterSy...@googlegroups.com

Michael Cohen

unread,
Jun 12, 2013, 9:58:00 AM6/12/13
to InterSy...@googlegroups.com

If similar commands work on that system, perhaps the failing command includes a non-printing control character.

 

Can you copy a working version from one system and PCPERFORM it on the failing system?

 

Josh Barney

unread,
Jun 12, 2013, 10:01:02 AM6/12/13
to InterSy...@googlegroups.com

That is copied from another system that the command is working on. The only difference between the two systems is 3 chars of the username and 10 character password

 

From: Michael Cohen [mailto:Michae...@intersystems.com]
Sent: Wednesday, June 12, 2013 9:58 AM
To: InterSy...@googlegroups.com
Subject: RE: [InterSystems-MV] SH command <NAMEADD> error

 

If similar commands work on that system, perhaps the failing command includes a non-printing control character.

 

Can you copy a working version from one system and PCPERFORM it on the failing system?

 

--

Edward Clark

unread,
Jun 12, 2013, 10:04:16 AM6/12/13
to InterSy...@googlegroups.com
Are the systems all the same version of Caché, and all running on the same version of windows?
What release of Caché are you using. Use
  w $zv
from an object script prompt to get the cache version, and
 SH VER
from the mv shell to get the windows version.


From: InterSy...@googlegroups.com [mailto:InterSy...@googlegroups.com] On Behalf Of Josh Barney
Sent: Wednesday, June 12, 2013 10:01 AM

Edward Clark

unread,
Jun 12, 2013, 10:25:21 AM6/12/13
to InterSy...@googlegroups.com
as a workaround, you could write the command to a batch file, and execute that:
 
0001 pcperform "echo %TEMP%" capturing tempdir; tempdir=tempdir<1>
0002 bfname='batch':@userno:'.bat'
0003 openpath tempdir to tempfp else abortm "unable to open temp directory ":tempdir
0004 cmd='ECHO Y | c:\WINSCP.COM /command "option confirm off" "open ftps:username:pass...@ftp.ftpserver.com -explicitssl -certificate="some certificate here"" "get transactions*.csv C:\CLEARGAGEIN\MRI\" "exit"'
0005 write cmd on tempfp,bfname
0006 pcperform tempdir:'\':bfname
0007 delete tempfp,bfname
 
I have some notes saying that some version of windows are flaky with multiple quoted strings in the same command. A command might work directly from a windows cmd prompt or batch file, but won't work with some windows functions, for example CreateProcess().
 
 
 
 


From: InterSy...@googlegroups.com [mailto:InterSy...@googlegroups.com] On Behalf Of Joshua Barney
Sent: Wednesday, June 12, 2013 9:44 AM
To: InterSy...@googlegroups.com
Subject: [InterSystems-MV] SH command <NAMEADD> error

I am trying to figure out why I am getting a <NAMEADD> error on only one system using this comment
SH ECHO Y | c:\WINSCP.COM /command "option confirm off" "open ftps:username:pass...@ftp.ftpserver.com -explicitssl -certificate="some certificate here"" "get transactions*.csv C:\CLEARGAGEIN\MRI\" "exit"
It is working on 6 of 7 servers, the 7th server will not accept ECHO y |, command works without it

Reply all
Reply to author
Forward
0 new messages