× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you Scott for the feedback!

I will answer your inquiries and comments the best I can:

=============================================================

===>"a) Neither the &SYSTEM nor &MSG variable is declared."
They are defined but I forgot to include them in the code.  Sorry about 
that.

DCL        VAR(&SYSTEM)   TYPE(*CHAR) LEN(8) 
DCL        VAR(&MSG)      TYPE(*CHAR) LEN(200) 

===> "b) In two places you have a CHGVAR command where the VALUE is on the 
next line..."
I did break the line in two.  When we send emails, sometimes the lines are 
"splitted" in two and looks weird.  I just wanted to illustrate what I was 
seeing in the code.  Obviously, this is not coded like that in the 
program.  It will not compile.

===> "c) After STRPCO you monitor for CPF0000 -- "
Is true.  However, this message is recorded in the joblog and that is all: 
is not affecting the final result.  For good programming behavior, I 
followed your recommendation and changed it to monitor the id IWS4010. 

===> "d) You declare &OBJ as 1000 chars and accept it as a parameter..."
I am calling this CLP from an RPGLE, not doing it from a command line.  Is 
this RPGLE pgm that is calling the CLP and sending the parameter.

===> "e) You use RTVNETA to get the system name to use in a UNC path. This 
is incorrect."
Then, I do not understand why is working perfectly if I try to use it for 
files with no spaces in between, like DIRECTDATA.txt, SAMPLEDATA.XLS or 
TEST_DATA.TXT?

===> "f) You assemble your UNC path into the &SYSPATH variable, which is 
1000 chars long.  This won't work..."
Again, I am confused then when the other examples presented above can 
work.

===> "g) The samples that you included in the e-mail involve a UNC path 
that points to TXT file.  You then pass this UNC path to STRPCCMD -- which 
makes no sense..."
Just for illustration of the issue, if I go to Windows Explorer and type 
in \\TT400\ROOT\TEST\Copy of DETAILDATA.txt it will automatically launch 
NOTEPAD.EXE but it will not work from my CLP; However, if I try to access the 
file\\TT400\ROOT\TEST\DETAILDATA123456abcdef.txt it will automatically launch 
NOTEPAD.EXE and it will do exactly the same 
thing if I run it using my CLP. 

WHY??? I agree, makes no sense.

===> "h) You have "GOTO CMDLBL(END)" but there's no END label in the 
program.  If you intend this to end the program, consider replacing it 
with the RETURN command, since that'll end the program (and make the GOTO 
unnecessary)"
Again, I did no included it because the program is long and because the 
program compiles, I though that I was not needed.  Probably I need to be 
more meticulous when sharing the background of the issue to the group.  My 
bad.  However, I see the point of using the RETURN.  I replaced my code to 
do as recommended.

===> "i) You set a &MSG variable to contain an error message, but you 
don't ever use that variable.  It's not displayed to the user or sent as an 
exception or anything like that.  If 
an error does occur, nobody will know about it."
Again, I did no included it in the original post.

=====================================
=====================================
=====================================
Additional questions: 

a) What is an UNC path?
b) How can I add the quotes at the end of this parameter so the STRPCCMD 
command can work correctly?


Peter Vidal 
PALL Corporation / SR Programmer Analyst, IT Development Group
10540 Ridge Rd., Ste 203, New Port Richey, FL 34654-5111
http://www.pall.com

"At any rate, I am convinced that He [God] does not play dice."
Albert Einstein (1879-1955), In a letter to Max Born, 1926

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.