Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD A case where the "List" command is clearly not working at all...

May
855
0
Since I, myself, found this a little hard to believe, I am placing just below the complete transcript of a TCC session that clearly "illustrates" the problem. Now, to be clear about what you should be looking for, there is a line "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN |& List" where the "List" command very clearly shows absolutely nothing, immediately returning to the command prompt. And the lines both before and after that line clearly shows that A: The batch file being run does produce output, and B: The "List" command does still work in at least most of the time, and I have no reason at all to believe at this point in time that it is not working in general.

So below is a complete transcript of a TCC "session" broken up into "sections" demonstrating various things I did both to verify that the .bcc file in question was, in fact, producing output, and then to verify that the "List" command was/was not working in various cases.

Code:
   Sun  Jan 15, 2012   8:26:23p

ISO8601 plugin v1.1.1 loaded.
SafeChars plugin v1.5.7 loaded.
Sift v0.55.0 loaded.

TCC  12.11.76   Windows 7 [Version 6.1.7601]
Copyright 2011  Rex Conn & JP Software Inc.  All Rights Reserved
Registered to Daniel Mathews

[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN
DeleteLinesInOtherFilesFromLinesReadFromSTDIN
Fatal Error: Missing all all parameters!
             "DeleteLinesInOtherFilesFromLinesReadFromSTDIN" ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I /S abc
Error:  Was expecting the name of an input file and no input file
        name was specified!
File abc does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "abc" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.
Return code was: 16

As you can see from the above, the batch file did produce output.

Code:
[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN >&TestDeleteLinesInOtherFile
sFromLinesReadFromSTDIN.txt

There was no output at all written to the console in this case, so clearly the output in the previous section was not being produced by "@Echo .... >CON:" statements.

Code:
[Z:\]List TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN.txt
  TestDeleteLinesInOtherFilesFromLine │ F1 Help │      Col 0    Line 1          0%
DeleteLinesInOtherFilesFromLinesReadFromSTDIN
Fatal Error: Missing all all parameters!
             "DeleteLinesInOtherFilesFromLinesReadFromSTDIN" ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.

And listing the output file generated in the previous "section" clearly shows that the hoped for and expected output was written to the file "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN.txt".


Code:
[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN |& List

As you can see above, the "List" command clearly did not appear to execute at all as there is no trace of it having done anything whatsoever in this transcript.

Code:
[Z:\]Dir |& List
  STDIN                               │ F1 Help │      Col 0    Line 1          0%

 Volume in drive Z is RAMDisk        Serial number is 4cce:7e9a
 Directory of  Z:\*

12/09/2011  14:02         <DIR>    A Directory 1
12/09/2011  14:02         <DIR>    A Directory 2
12/30/2011  20:38         <DIR>    D-Drive Temporary Save Area Because D-Drive Is E
 1/03/2012   4:09         <DIR>    Development
12/16/2011   0:44         <DIR>    DoIt
 1/09/2012  15:57         <DIR>    Final Song List Files
12/29/2011  16:32         <DIR>    JPSoft

[Z:\]

And yes, the "List" command is working in the general case.

While I don't really consider this to be a "critical" issue because I have a not-too-inconvenient "workaround", it is quite annoying because the "List" command is one of the most extensively used commands in my "arsenal". And since this is, to me, clearly a "bug" of some kind I am reporting it as such.

- Dan
 
I think it is extremely unlikely to be a bug in LIST or TCC (unless a serious bug in TCC redirection has somehow completely escaped notice for the last 20 years).

The problem is much more likely to be something in "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN", but since you didn't provide any clue as to what that file is doing or any source code, I can't hazard an educated guess as to the cause. But most of the time when something like this is brought up, it's either because there's an unacknowledged additional redirection going on that's diverting the output somewhere else before LIST sees it, or there's an embedded START somewhere that's sending the output to a different session, or you've got some forgotten alias getting in the way.
 
Rex, I'm not at all surprised at your answer; I would have said the same thing before this actually happened. However, there are no "Starts" or any "redirections" (other than to NUL: in the "appropriate" places) in either of the two .btm files involved (and there are also no other "executable" files of any kind involved), so your "possible" answer(s) simply do not apply in this case. And I am attaching a .zip file containing the "Test" .btm file and the .btm file being tested to this posting so you can verify that that is, in fact, the case for yourself.
 

Attachments

  • Malfuntioning\'List\'Command.btmFiles.zip
    2.3 KB · Views: 323
After I fixed the two errors in your batch file everything worked as expected.

Look in the two IFF statements at line 92 and line 96, and change the nonexistent "@EchErr" command to "@EchoErr".
Rex, thank you! I'm laughing as I type this. :) And it's really not all that surprising as as I have mentioned before I have very poor eyesight (a 20pt font is about the minimum I can read well without the Windows "Magnify" app).

But why would those particular mistakes cause the "List" command to effectively not execute when there was output and STDOUT was written directly to the console or to a file?
 

Similar threads

Back
Top