IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How do I convert a string to a 80 byte file

    Posted 07/18/02 06:44 PM

    What’s the best way to convert a large string to a 80 byte file? I am using the generateFA service in the EDI Adapter package in IS 4.6. The output 997 is one string. I want to save this to a 80 byte file. Thanks for any input.

    Rebecca


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: How do I convert a string to a 80 byte file

    Posted 07/18/02 07:05 PM

    I’m completely baffled by this question. Can you elaborate on the specifics of what you’re trying to do?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How do I convert a string to a 80 byte file

    Posted 07/18/02 07:39 PM

    The generateFA service generates a EDI X12 997. The output is a string that is more that 80 bytes. I want to save this string to a text file in 80 byte increments.

    I would be glad to email you my output files offline if that would help. Thanks.

    Rebecca


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: How do I convert a string to a 80 byte file

    Posted 07/18/02 07:49 PM

    So, 80 characters per output file line, you mean?


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: How do I convert a string to a 80 byte file

    Posted 07/18/02 07:52 PM


  • 6.  RE: How do I convert a string to a 80 byte file

    Posted 07/18/02 08:36 PM

    You need a Java service to write to a file. Someone has posted the code for that in one of the discussions here and/or on Advantage.

    For writing the string, here’s a rough approach:

     
    set an index var to 0 
    while index to end of string > 80 
    { 
    write chars from index to index+80  
    write a CR/LF (or just LF if Unix) 
    add 80 to index 
    } 
    write chars from index to end of string 
    write a CR/LF if desired 
    

    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB