Moving files from an OVMS to a Windows file system with BizTalk

Posted: August 12, 2010  |  Categories: BizTalk Uncategorized

Recently I had to integrate a legacy application on DEC server with a Windows 2003 server. I am writing about it here because it was surprisingly difficult.

The  first unsuccessful approach i tried was to set a SAMBA file share on the OVMS server using pathworks.  BizTalk was set up to poll the share and retrieve files using the standard BizTalk file adapter. BizTalk initially picks the file up but the adapter keeps on shutting down because it cannot monitor file events.The error is

“The receive location “Flat Files From OVMS FILE” with URL “\\test\PTV_OD\*.DAT” is shutting down. Details:”The FILE receive adapter cannot monitor receive location \\test\PTV_OD\. ” .

I think that this means that the receive location was shut down because it can not register file change notification. I think what happens is that when you have a number of the files in the directory already, the file receive will  process the files one by one before it finishes all the files in the directory. Once there are no more files in the folder, it will try to register for next change event notification. This fails, and the receive location will then be shut down. I did not investigate further but it seems that Pathworks does not expose a file share that BizTalk can use properly.

The second approach I tried was to enable FTP on the OVMS server and set up a OVMS FTP share. A standard BizTalk FTP adapters was configured to retrieve the files. BizTalk retrieves the file but is unable to delete the file. as shown in the log below;

< 220 TEST.net FTP Server (Version 5.4) Ready.
> USER TEST
< 331 Username TEST requires a Password
> PASS xxxx
< 230 User logged in.
> PWD
< 257 “TEST_:[RUN]” is current directory.
> SYST
< 200 VMS OpenVMS V7.3 on node TEST.net.
> PWD
< 257 “TEST_:[RUN]” is current directory.
> TYPE A
< 200 TYPE set to ASCII.
> PORT 10,3,8,155,10,65
< 200 PORT command successful.
> LIST *.TXT
< 150 Opening data connection for *.TXT (10.3.8.155,2625) < < Directory VOICE_TEST_:[RUN] <
< TEST.TXT;1               1/69         29-JUL-2010 15:18:41  [600,4073]             (RWED,RWED,RWE,)
<
< Total of 1 file, 1/69 blocks
< 226 LIST Directory transfer complete.
> TYPE I
< 200 TYPE set to IMAGE.
> PORT 10,3,8,155,10,70
< 200 PORT command successful.
> RETR TEST.TXT
< 150 Opening data connection for VOICE_TEST_:[RUN]TEST.TXT;1 (10.3.8.155,2630) (64 bytes) < 226 Transfer complete.
> DELE TEST.TXT
< 550-Failed to delete file TEST.TXT
< 550 The file specification must contain a version number (even if wildcarded).

> QUIT
< 221 Goodbye.

Unfortunately the out of the box OVMS FTP service is not supported by the BizTalk FTP adapter because when it attempts to delete the file it doesn’t add an “;” “;1” or “.” and OVMS rejects the delete. 

I found a solution to this problem namely run $ DEFINE /SYSTEM TCPIP$FTP_NO_VERSION 1 on the OVMS server to suppress the version number. This is described here http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1281399961425+28353475&threadId=964779 . Now a FTP client does not have to supply the versions.  Although if you actually specify versions, then it still behaves normally..

  • Not specifying a version returns only the most recent
  • Specifying a wildcard for version number shows all versions of the file
  • Specifying a version number shows that particular version of the file
  • You can still specify a relative version number.. just like you would normally do in VMS
  • You can still delete a specific version as you would without the logical
  • If you don’t specifying a version only the highest version is affected
  • Specifying a version but having a * wildcard at the end behaves as you would want it. ie. only deletes the highest version (not all version)
  • To delete all versions you’d have to specify ;* at the end.

(Thanks to Mario Lueckoff for working all of the above out).

Finally the log for Biztalk FTP receive adapter now shows the delete is successful.

220 TEST..net FTP Server (Version 5.4) Ready.
> USER TEST
< 331 Username TEST requires a Password
> PASS xxxx
< 230 User logged in.
> PWD
< 257 “TEST_:[RUN]” is current directory.
> SYST
< 200 VMS OpenVMS V7.3 on node TEST.net.
> PWD
< 257 “TEST_:[RUN]” is current directory.
> TYPE A
< 200 TYPE set to ASCII.
> PORT 10,3,8,155,18,146
< 200 PORT command successful.
> LIST *.DAT
< 150 Opening data connection for *.DAT (10.3.8.155,4754)
<
< Directory TEST_:[RUN]
<
< TEST.DAT;1
<                          2/69          9-AUG-2010 08:56:20  [600,4073]             (RWED,RWED,RWE,)
<
< Total of 1 file, 2/69 blocks
< 226 LIST Directory transfer complete.
> TYPE I
< 200 TYPE set to IMAGE.
> PORT 10,3,8,155,18,149
< 200 PORT command successful.
> RETR TEST.DAT
< 150 Opening data connection for TEST_:[RUN]TEST.DAT;1 (10.3.8.155,4757) (774 bytes)
< 226 Transfer complete.
> DELE TEST.DAT
< 250 File VOICE_TEST_:[RUN]TEST.DAT;1 deleted.

In summary defining this logical does not affect other FTP clients but does allow the BizTalk FTP adapter to work.

  • Thomas

    Hi,
    With 2006 R2, the fix kb950980 (included in SP1) for FTP Adapter comes with a new option “Use Namelist (NLST)” ; with this option on, I could retrieve files from a VMS Server.
    Thomas

    • Yes, that solution works Thomas. Switching Use Namelist (NLST) to Yes resolves the following error for the OVMS FTP location:
      Unable to receive the file “filename” from the FTP server. The error that occurred was “The remote file could not be opened by the FTP server. “. “.

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top