Paul's Petrov Whiteboard

[BizTalk, Enterprise Application Integration, Business Process Automation, SOA, .NET]

  Home  |   Contact  |   Syndication    |   Login
  56 Posts | 1 Stories | 80 Comments | 30 Trackbacks

News

Archives

Post Categories

Image Galleries

BizTalk

Other

Recently, I had to create an orchestration that transfers files to the IBM mainframe running z/OS (also called sometimes MVS - Multiple Virtual Storage because of the legacy). The orchestration used dynamic FTP port to correlate incoming messages to the destination. During this exercise I learned something about FTPing to the mainframe with BizTalk adapter.

First, flat files obviously must be passed in ASCII mode so the FTP server is able to convert them to EBCDIC format. Passed in binary mode files will not be readable as text files since these two formats have incompatible code pages. To ensure proper conversion set FTP.RepresentationType to "ASCII" on the message context.

Second, records in files must be separated with CR LF not just LF as I was getting from UNIX system. Otherwise, only one record was transferred. You'd likely get a message like "250 Transfer completed (data was truncated)".

Third, record size must be passed to the mainframe system. This is done by setting FTP.BeforePut property to command options like: SITE DCB LRECL=50 RECFM=FB where LRECL sets the record size of 50 characters.

Finally, on some MVS datasets we experienced data truncation even if the LRECL was set properly when record size in flat file exceeded 80 characters. Those unlucky files kept getting truncated to 80 characters per records (which is default value for z/OS) until I sent command WRAPRECORD. So, for such cases setting FTP.BeforePut to something like "SITE DCB LRECL=600 RECFM=FB WRAPRECORD" did the trick.

posted on Friday, October 19, 2007 12:17 AM

Feedback

# re: Sending flat files to IBM z/OS mainframe by BizTalk FTP adapter 1/29/2008 6:03 PM Brad
How were you getting the files from Unix? I have a project where I need to poll a Unix folder for a flat file to send to a mainframe....

# re: Sending flat files to IBM z/OS mainframe by BizTalk FTP adapter 1/29/2008 6:25 PM Paul Petrov
I created Windows service that used custom file watcher (.Net file watcher did not work with Unix location through NSF services).

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: