none
Host file adapter for read File from AS/400 RRS feed

  • Question

  • I am currently struggling of using Host file adapter for reading a file from AS/400 system.Point I am struggle in when creating host file library how to define the data structures. It is possible to define it using import HDC file or Host Defenition(RPG program). how do i create HDC file or RPG program ?.
    • Moved by Ben Cline1Moderator Tuesday, August 25, 2009 3:21 PM Related to BizTalk Adapters (From:BizTalk Server General)
    Thursday, August 20, 2009 12:28 PM

Answers

  • Finally I succeeded

    When Create Host file Library application Host File Name property represent Physical file in A/S 400. Host file name property format should be <Library>.<File Name> or <Library>/<FileName> format. If specify format not like that you will some time get error like this in Event log when you run application.

    The adapter "HostFiles" raised an error message. Details "There was an error in the receive location with URI: HostFiles://xxx.xxx.xxx.xx:xxx/xxxx/xxxx/4ea5c9-4b8f-4cc6-b519-cdc7c13506c0, Transport Type:HostFiles. Internal message: An error occurred while opening the cursor. Error from source: The file was not found on the host system.".

    At first step I created Schema Dentition for the Host File Library project manual. Once I deployed and tested application again I got error like as bellow.

    The adapter "HostFiles" raised an error message. Details "There was an error in the receive location with URI: HostFiles: //xxx.xxx.xxx.xx:xxx/xxxx/xxxx/xxxx /0d4ea5c9-4b8f-4cc6-b519-cdc7c13506c0, Transport Type:HostFiles. Internal message: (1508) The input buffer has been exhausted while attempting to convert Structure or Record in processing structure.
    The end of the input buffer has been reached and Host File Provider is expecting to perform data conversions on one or more parameters.  Check the server program.  If it is correct verify, that the correct Host File Provider-created component library is deployed.

    (In my Case host file is just a physical file with one column)
           I though error came because of some kind of data types mismatching. When Create Host File Library Project it is posible define HostFile Library with import HCD file. If machine is Installed Host Integration Server then sample HCD file createed in SDK. What I did was I just change the sample HCD file to accouding my Host file information and import the HCD file. Then I deployed Host File Library and integraded it to BizTalk Project and run application. Then it worked fine.

    Thanks so much Ben Cline1 to assist me  figure out this.
    • Marked as answer by akshalika Friday, August 21, 2009 9:48 AM
    • Unmarked as answer by akshalika Friday, August 21, 2009 10:00 AM
    • Marked as answer by akshalika Friday, August 21, 2009 10:02 AM
    • Edited by akshalika Wednesday, September 9, 2009 6:26 AM
    Friday, August 21, 2009 9:48 AM

All replies

  • Rephrase? :-)

    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    Thursday, August 20, 2009 12:35 PM
  • Yes, you can import the RPG or COBOL program into the host files designer and the wizard will read the RPG file and generate a BizTalk schema for you. Here is a link to information about this: http://www.microsoft.com/downloads/details.aspx?FamilyID=ce46a7d0-93b7-4076-b36b-f1c62715b5fa&displaylang=en. Once you have this document open, click on the section "BizTalk Adapter for Host Files" in the table of contents.

    Here are the directions for this as well: http://msdn.microsoft.com/en-us/library/aa753955(BTS.10).aspx

    The BizTalk host adapters provide this capabilitiy.

    Let me know if you have other questions.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, August 20, 2009 1:40 PM
    Moderator
  • Hi Ben,
              Really appriate your reply. My point is how do I create RPG and COBOL program means is there .Net tools or I have to manually do that. And What are the content of those program?
    Thursday, August 20, 2009 2:01 PM
  • My application has one receive port which is configure to retrive data from AS/400 file and one send to to send them to disk. Once i start application i am getting bellow error.

    Event Type:    Warning
    Event Source:    BizTalk Server 2006
    Event Category:    BizTalk Server 2006
    Event ID:    5740
    Date:        8/20/2009
    Time:        8:05:39 PM
    User:        N/A
    Computer:    CD-xxxxxxxxx
    Description:
    The adapter "HostFiles" raised an error message. Details "There was an error in the receive location with URI: HostFiles://xxx.xxx.xxx.xxx:xxx/s65ae74b/xxxx/0d4ea5c9-4b8f-4cc6-b519-cdc7c13506c0, Transport Type:HostFiles. Internal message: An error occurred while opening the cursor. Error from source: The file was not found on the host system.".

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    • Edited by akshalika Wednesday, September 9, 2009 6:26 AM
    Thursday, August 20, 2009 2:42 PM
  • It  is generally assumed you already have RPG or COBOL programs for the host file data. If you do not, then you can copy and modify the samples.

    Your error message looks like you have is that it cannot find the file on the AS/400. Review your port properties to see if you misspelled one of the properties. You also check that the file exists on the host system.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, August 20, 2009 3:42 PM
    Moderator
  • Hi Ben,
           Thanks for the reply.
             In my above error what does it mean by Host Files(I know it is refer to the A/S 400 file) is it come from "Host file Name" property which we give in Host File Library project creation ?. I want to known from which property it get A/S 400 file name. In above example I give that property when I create Host File Library project in "Host File Name" property.
    Thursday, August 20, 2009 4:11 PM
  • I did a little more research and found out some more information. BizTalk can actually generate RPG for you in the host data definition tab when you are editing the tables and schemas of the host file properties.

    In Visual Studio when working with a host files project, you can create the host library definition with tables and schemas. The tables have a host file name property. The schemas define the content of data in the tables.

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Thursday, August 20, 2009 8:16 PM
    Moderator
  • Finally I succeeded

    When Create Host file Library application Host File Name property represent Physical file in A/S 400. Host file name property format should be <Library>.<File Name> or <Library>/<FileName> format. If specify format not like that you will some time get error like this in Event log when you run application.

    The adapter "HostFiles" raised an error message. Details "There was an error in the receive location with URI: HostFiles://xxx.xxx.xxx.xx:xxx/xxxx/xxxx/4ea5c9-4b8f-4cc6-b519-cdc7c13506c0, Transport Type:HostFiles. Internal message: An error occurred while opening the cursor. Error from source: The file was not found on the host system.".

    At first step I created Schema Dentition for the Host File Library project manual. Once I deployed and tested application again I got error like as bellow.

    The adapter "HostFiles" raised an error message. Details "There was an error in the receive location with URI: HostFiles: //xxx.xxx.xxx.xx:xxx/xxxx/xxxx/xxxx /0d4ea5c9-4b8f-4cc6-b519-cdc7c13506c0, Transport Type:HostFiles. Internal message: (1508) The input buffer has been exhausted while attempting to convert Structure or Record in processing structure.
    The end of the input buffer has been reached and Host File Provider is expecting to perform data conversions on one or more parameters.  Check the server program.  If it is correct verify, that the correct Host File Provider-created component library is deployed.

    (In my Case host file is just a physical file with one column)
           I though error came because of some kind of data types mismatching. When Create Host File Library Project it is posible define HostFile Library with import HCD file. If machine is Installed Host Integration Server then sample HCD file createed in SDK. What I did was I just change the sample HCD file to accouding my Host file information and import the HCD file. Then I deployed Host File Library and integraded it to BizTalk Project and run application. Then it worked fine.

    Thanks so much Ben Cline1 to assist me  figure out this.
    • Marked as answer by akshalika Friday, August 21, 2009 9:48 AM
    • Unmarked as answer by akshalika Friday, August 21, 2009 10:00 AM
    • Marked as answer by akshalika Friday, August 21, 2009 10:02 AM
    • Edited by akshalika Wednesday, September 9, 2009 6:26 AM
    Friday, August 21, 2009 9:48 AM
  • Awesome, glad you got it working!
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Friday, August 21, 2009 3:18 PM
    Moderator