Page 1 of 1 1
Topic Options
#195563 - 2009-08-24 10:58 PM Long File name VS Short File Name
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
First time I have ever run into a problem like this, but thought I would ask anyways's

On an FTP server my client is recieving hundreds of files daily.
Each of these files use Long File Names to distinguish which is which
Large groups of files start with the same prefix on the file name (14 characters in length). Followed by a unique identfier of 40 characters

These files are highly transitory on the server, generally never there more than a few hours at a time.

The retrieving application picks up the files through the use of a DIR (nlst actually) command.

Within the last week we have been getting bad results of this listing.

Found that when you issue a DIR /X to see the short names, that it is identifying the files incorrectly. Here is an example ....

 Quote:

Note the major discrepancy between the file names. They do not follow what we learned should be the short names.

08/24/2009 05:46 AM 1,060,116 AZCI83~3.TXT AZCI837.HP00006.090824054518
79.TXT
08/24/2009 08:52 AM 4,177,338 AZA720~1.TXT AZCI837.HP00010.090824085158
35.TXT
08/24/2009 01:48 PM 666,330 AZ759B~1.TXT AZCI837.HP00019.090824134721
09.TXT
08/24/2009 01:14 PM 260,520 AZ36AF~1.TXT AZCI837.HP00041.090824131327
28.TXT
08/24/2009 10:58 AM 255,510 AZ643B~1.TXT AZCI837.HP00049.090824105758
32.TXT
08/24/2009 10:58 AM 610,218 AZ6A26~1.TXT AZCI837.HP00049.090824105801
35.TXT
08/24/2009 10:59 AM 33,066 AZ6A2C~1.TXT AZCI837.HP00049.090824105806
32.TXT
08/24/2009 01:51 PM 1,641,276 AZ56A0~1.TXT AZCI837.HP00058.090824135001
15.TXT
08/24/2009 01:20 PM 291,582 AZ6E73~1.TXT AZCI837.HP00098.090824131924
37.TXT


Any ideas?
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195576 - 2009-08-25 08:57 AM Re: Long File name VS Short File Name [Re: Gargoyle]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
It's working fine, you are just encountering a change in algorithm when Windows starts to see a lot of files with the same prefix. See MS KB article http://support.microsoft.com/kb/226403/ which describes the issue:
 Quote:
However, unlike Windows 95/98, if more than four files result in the same first six characters, Windows 2000 uses a different procedure starting with the fifth file. Windows 2000 then:
  • Uses the first two letters of the long file name.
  • Generate the next four letters of the short file name by manipulating the remaining letters of the LFN.
  • Appends "~1" (or another number).

Top
#195585 - 2009-08-25 03:36 PM Re: Long File name VS Short File Name [Re: Richard H.]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Thanks Richard. I have to find some sort of workaround for this as it is causing production jobs to fail now.

Does anyone know why when a user on zOS, issues a NLST against an FTP server on a secure connection (ftp over ssl), Windows server reports back with the long file names, but appears to use the 8.3 name for the actual NLST.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195586 - 2009-08-25 03:41 PM Re: Long File name VS Short File Name [Re: Gargoyle]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Don't have a setup to test here...

Did you try a plain old LIST?

Top
#195589 - 2009-08-25 04:35 PM Re: Long File name VS Short File Name [Re: Richard H.]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
I have done LS NLST DIR etc etc etc... The output from above is directly from a command prompt.

The Output below is exactly what the user gets from the commmand
 Quote:

EZA1701I >>> NLST AZED*
150 Opening ASCII mode data connection for file list.
EZA2284I AZEP_HP010299_2009082110214608_PHP837P082109_015.TXT
EZA2284I AZEP_HP010299_2009082110290479_PHP837P082109_041.TXT
EZA2284I AZEP_HP010299_2009082110175967_PHP837P082109_001.TXT

EZA2284I AZED_HP010299_2009082110131872_PHP837D082109_001.TXT
EZA2284I AZED_HP010299_2009082110133314_PHP837D082109_002.TXT
EZA2284I AZED_HP010299_2009082110134761_PHP837D082109_003.TXT
EZA2284I AZED_HP010299_2009082110140214_PHP837D082109_004.TXT
EZA2284I AZED_HP010299_2009082110141692_PHP837D082109_005.TXT
EZA2284I AZED_HP010299_2009082110143155_PHP837D082109_006.TXT
EZA2284I AZED_HP010299_2009082110144658_PHP837D082109_007.TXT
EZA2284I AZED_HP010299_2009082110150109_PHP837D082109_008.TXT
EZA2284I AZED_HP010299_2009082110151583_PHP837D082109_009.TXT
EZA2284I AZED_HP010299_2009082110153050_PHP837D082109_010.TXT
EZA2284I AZED_HP010299_2009082110154501_PHP837D082109_011.TXT
226 Transfer complete. 777 bytes transferred. 777 bps.



As you can see they are getting the long file names returned to them, but the false returns (the first 3) appear to be caused by the use of 8.3 names.

The listing that is retrieved here is used to build JCL jobs on the mainframe and when the improper files are picked up, the entire job abends and we all know how that goes
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195591 - 2009-08-25 06:28 PM Re: Long File name VS Short File Name [Re: Gargoyle]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
It's been a while since dealing with mainframe, but I seem to recall the generation of TP reports when things abend. \:\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#195592 - 2009-08-25 07:40 PM Re: Long File name VS Short File Name [Re: Glenn Barnas]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
The Abend is not the problem, it is why the target (my server) is returning invalid results.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195594 - 2009-08-25 08:39 PM Re: Long File name VS Short File Name [Re: Gargoyle]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Clearly you misunderstand the lack of sincerity and technical non-prowess in my last post. \:D (It was a joke - "TP Reports" - obviously a bad one if I'm here explaining it...)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#195596 - 2009-08-25 09:33 PM Re: Long File name VS Short File Name [Re: Glenn Barnas]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Been at this one to long then. If I can't see something so obvious...
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195598 - 2009-08-26 12:25 AM Re: Long File name VS Short File Name [Re: Gargoyle]
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
pc load letter... what does that even mean?

so i am guessing that you are getting this list via the FTP client... so using FSO is not an option.

Top
#195601 - 2009-08-26 02:04 AM Re: Long File name VS Short File Name [Re: Bryce]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
 Originally Posted By: Bryce
pc load letter... what does that even mean?
I would have thought that it was intuitively obvious - the Paper Cassette wants to get LOADed with LETTER size paper... get with the program, dude! \:D

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#195605 - 2009-08-26 08:29 AM Re: Long File name VS Short File Name [Re: Glenn Barnas]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Bryce you are correct. zOS talking to FTP which then talks to a windows server.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195607 - 2009-08-26 08:50 AM Re: Long File name VS Short File Name [Re: Gargoyle]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Can you work around it by generating a directory list file on the host when a file arrives or periodically?

Pull down the file and use that for retrieval rather than the NLST.

Another option is to turn off 8.3 file name generation on the Windows server if you don't need it.

Top
#195612 - 2009-08-26 03:30 PM Re: Long File name VS Short File Name [Re: Richard H.]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
 Quote:

Another option is to turn off 8.3 file name generation on the Windows server if you don't need it.


How is this done, never knew of an option to do so. In the meantime - off to Google
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195613 - 2009-08-26 03:41 PM Re: Long File name VS Short File Name [Re: Gargoyle]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Linky: http://support.microsoft.com/kb/121007

Beware the caveat - 16 bit apps might not like it.

Top
#195617 - 2009-08-26 08:19 PM Re: Long File name VS Short File Name [Re: Richard H.]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Thank you very much. I will confirm with our software vendors that this will not break anything on their side as well and go from there.

And that is why I ask here first, TP and all.
_________________________
Today is the tomorrow you worried about yesterday.

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.064 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org