Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
We have a IBM z/OS (mainframe) application
which sends files to pc. The files shoud be
handled in pc by a Basic program (and then sent to printer, thru LPR command, no spooling) in the same order as the mainframe creates them. So the oldest file should be printed first.Mainframe user is packing about 10 mail order parcels and then the user, with CICS transaction, sends those 10 packing list files to pc, windows 2000. It is possible to send all these files within one (and the same) minute.
The printer does not print the files in correct order. I have set in a pc program the dir time sort order to /OD.
Windows NT 4.0 used to handle the files in correct order.
How can I fix this in Win 2000?
Do I need a dir listing program instead of using DIR ? Are there any?
The dir command does not show minutes and seconds, but in an XP the command dir /OD seems to work, too. In my home pc (XP) I tested dir, and I noticed that I must first
destroy the DIRCMD environment setting. DIRCMD is not set in the Win 2000 pc, which is in production.

I just thought of something else. If sort by itself doesn't work, you could pipe one to the other or make a batch file if windows doesn't handle pipes.

That's an interesting problem. As long as there's problems they may as well be interesting.
A little admittedly unscientific testing seems to indicate that DIR /OD "knowa about" the seconds ticker. If so, you should be able to send the files to printer in the date order.
This bat creates a few files, waits 1.5 seconds, updates the time stamp on one of them. Notice that file 2 moves to bottom after time stamping. AFAIK DIR /OD does not know about the 1/100ths ticker, so if you files are less than one second apart, you probably out of luck.
HTH
::== tryDATES.bat
@echo offfor /L %%N in (1 1 5) do (
type nul > %%N
)
dir /od|find "2006"
ping 0.0.0.2 -n 1 -w 1500 > nul
copy 2,,+ > nul
dir /od|find "2006"
:: DONE
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |