Can the File Adapter handle Multiple Record Layouts in COBOL?

I am trying to parse flat files that have a record type field in the first four characters on each record. As a test I tried to use the following record definitions:
01 CONTRACT-HEADER.
05 RECORD-TYPE PIC X(4).
05 TRANSACTION-TYPE PIC X.
05 CONTRACT-NUMBER PIC X(32).
05 CONTRACT-RELEASE-NBR PIC X(30).
05 CONTRACT-FILLER PIC X(2025).
01 CONTRACT-LINEITEM.
05 RECORD-TYPE PIC X(4).
05 TRANSACTION-TYPE PIC X.
05 LINE-FILLER PIC X(1664).
I also tried smaller records with simple test data. When I press the "test" button in the native file adapter the XML is never generated if I have more than one record type as above. Suppose that the contract-header record type always has the string "X001" in it, while the contract-lineitem always has "X015" in the record-type. I chose Us-ascii and chose $eol as a delimiter. The file on my windows computer has carriage return line feed after each record. I know that the fixed length converter works, but because the records really have 50 fields on each record type and are long, I don't think I can actually use that one in one sitting. Has anyone ever gotten two different record lenght cobol definitions to work? Do I have to hand edit the XML to specify the delimiter? I don't see any delimter specified in the generated XML before I attempt the test.

Rahul,
I recommned you should use "|" as "," can be embedded in a text string. I guess you can pass a directive to use to deliver "|" delimited file :). If you want to handle both then you might have to write a shell script or bat to pass delimiter as an argument which will edit and replace your control file.
Regards

Similar Messages

  • Outbound file adapter for multiple record write

    am using jdev 10.1.3.1
    and SOA suite 10.1.3.1
    I am trying to read a table and write the records to a csv file.
    The bpel process I have constructed is :
    receive > assign input value to table select parameter > select records from table > assign table select output values to file input value > invoke file adapter to write a csv file > assign a literal to process out value.
    when i execute this process it is showing me an error on the file adapter invoke activity.
    the error is :
    </part></Invoke_2_Write_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="summary"><summary>file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_TableReader_1.0_594707f7f819a3a4a2002c98afbd42fa.tmp/WritePersonFile.wsdl [ Write_ptt::Write(People) ] - WSIF JCA Execute of operation 'Write' failed due to: Translation Error.
    Error while translating message to native format.
    ; nested exception is:
         ORABPEL-11017
    Translation Error.
    Error while translating message to native format.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    </summary>
    any help would be appreciated.
    thanks

    Hi,
    In your case, to write any data to a file, you need to define/use a schema when you are using a file adapter.
    Cheers,
    Abhi

  • Data Merge/Multiple Record Layout...Can you change the order?

    I just had to do a mail merge with 4 postcards on a single letter size sheet.  Getting them to print with 4 different addresses per sheet using the Multiple Record Layout wasnt the problem.  You can choose for them to go in order from left to right or top to bottom.  Ok, thats all good.
    The problem I found was after cutting them, its impossible to keep them in order without doing a manual shuffle of all the cards.  Is there a way to have it print in an order so when they are cut, the 4 stacks can just stack on top of each other and stay in a proper order?  (using CS5)

    Well you cant really resort the excel file to work that way, not quickly or easily at all anyway.
    Currently it prints like this (representing the 4 corners of the page:
    page 1
    1    2
    3   4
    page 2
    5    6
    7    8
    page 3
    9    10
    11   12
    etc...
    There is no way to keep these in order after cutting without manually going through it...not fun when you have several hundred pages.  What makes a world more sense is to have it print like:
    page 1
    1    4
    7    10
    page 2
    2    5
    8    11
    page 3
    3    6
    9   12
    This way after its cut, the top left corner stack can go right on the top right corner stack, which goes on the bottom left corner, then bottom right corner.  Now you have a full stack in numerical order.
    Is it safe to say that InDesign cannot do this?

  • What is the Maximum Data can a file adapter can send at a time.

    Hi ,
    What is the Maximum Data can a file adapter can send at a time.Is there any maximum limit data can adapters will send.
    can any one help on this.
    regrads
    Raghu

    Hi Reddy,
    I have raised the same question and I got correct answer.
    Refer the below thread which will give u information.
    Wat is the maximu size of data XI can handle
    Thnx
    Chirag

  • Can I use a schema with no targetnamespace with the file adapter?

    I am loading a file using a file adapter configured to use an xsd from a third party, the third party controls the xsd and incoming xml and does not have a targetnamespace defined in the xsd or xml.
    When I define a file adapter for it the wizard indicates that I need to fix the xsd by adding a namespace. I dont have control over the xsd or xml as they are an external party.
    I think I can hand edit the wsdl and change the import statement that requires a namespace to an include statement with no namespace.
    Have you run into this before? Will that work?
    Thanks,
    John

    Hi John,
    Did we get any solution for this ?
    Even in our case, the third party controls the xsd & incoming xml message. Both does not have a targetnamespace defined. The file adapter wizard indicates that we need to fix the xsd by adding a namespace. As a workaround, we manually added the target namespace to xsd and created file adapater. Now the question is how do we automatically add the name space in xml message as well, so that it can be parsed by BPEL process
    thanks
    Yj

  • Can I use the File Adapter to transfer files from/to my own PC

    Hello,
    Would it be possible to set tu the file adapter to send or receive files from my own PC's file system?
    For example I would like to transfer a file from my PC to PI instead of using PI's file system?
    Can I do that?
    Thanks
    Marcelo

    If your PC has Windows-based system, SAP XI is Unix-based, you have a problem: Unix can't connect to UNC-path - Unix doesn't understand path like this "
    mywindowspc\myfilesharefolder\", and Windows can't mount unix-drives. There are has a tool that can mount Windows UNC-file-share on NTFS like dirive UnixFS - but this tool is not freeware and has a problem when you switch off your PC without unmounting your Windows-dirives on Unix system. You can use a SAMBA, but Admins doesn't like to install this to Unix...
    So, if you want to use a File Adapter you can set only FTP path, create FTP-site on your own PC, and so on...
    Another way to send information from/to your own PC is "Plain J2SE Adapter Engine". This is a standalone part of SAP XI, you install it on your PC, configures URL of XI pipline, sets local folders to transfer from/to your PC, masks and types of your files, time to sending, any rules and DOS-commands for "before/after sending and receiving" and so on...
    In case of sending files from PC to XI, files transforms to XI-payload inside this Adapter Engine and then goes like XI-message to pipeline... When you send it back, payloads come to this Adapter Engine and transform to files on your PC.
    I used this Plain J2SE AE on my working notebook for checking sending messages to many different XI Systems.
    For more info: http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/content.htm
    Regards.

  • How can i pass the name of the file polled by the file adapter to next step

    Hi XI guru's ,
    How can i pass the name of the file polled by the file adapter to next step in a BPM..?
    regards,

    Use Adapter-Specific Message Attributes and map that value in udf to the BPM message.
    Also see this
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    Regards,
    Prateek

  • I have Premier Elements 8.  I recorded some 45 minute lectures on a Sony Camcorder at 17 Mbps.  The resulting, edited file size is about 6.3 GB -- too big to record on a 4.7 GB DVD-R disc.  Using Adobe PE 8, can the file size be reduced in some way to end

    I have Premier Elements 8.  I recorded some 45 minute lectures on a Sony Camcorder at 17 Mbps.  The resulting, edited file size is about 6.3 GB -- too big to record on a 4.7 GB DVD-R disc.  Using Adobe PE 8, can the file size be reduced in some way to end up less than 4.7 GB (I realize image quality may be less htan the original)?

    pault
    What are you going for....DVD-VIDEO Widescreen on DVD disc or AVCHD format on DVD disc?
    Are you doing your burn to disc with a check mark next to "Fit Content To Available Space" in the burn dialog?
    When you have the DVD 4.7 GB/120 min in the burner tray and are in the burn dialog ready to hit Burn, what does the burn dialog quality area show for Space Require and Bitrate with and without the check mark next to "Fit Content To Available Space"?
    Just in case mention....the DVD disc with the 4.7 GB/120 min in reality is 4.38 GB.
    The goal is to find out if you are overlooking the "Fit Content To Available Space" option in the burn dialog. Depending on the circumstances to be defined, use of that option does not necessarily mean a compromise in the end product quality.
    Let us start here and then move forward based on the details of your reply.
    Thank you.
    ATR

  • How can I read different files in the file adapter

    Hi,
    I have a scenario like file(content conversion and FTP) to Proxy and need to read 2 files which have different structures.
    The file structures is as follows.
    FileA.txt
    EMPID, Designtion,code,DOB,dept,deptID and 13 fields etc..
    FileB.txt
    officercode, dept,workspecs,FLAGarm,FLAGfoot and 27 fields etc.
    Both files needs to be read by the file adapter at same time and should send to the proxy to feed in ECC.
    Please help me in designing the above scenario with or without BPM.
    Thanks
    Manmadha

    Hello,
    Since u want to combine the two files from sender , you need to use BPM for it.
    First of all create Mapping. In your mapping program go to messages tab and add the two source messages types and in the target add the target message type. Come to your design tab and design the mappings.
    BPM:
    -- Insert Fork with two branches necessary condition. In first branch insert Receive step and check start process checkbox.
    --In second branch insert Receive step and check start process checkbox.
    -- Insert Transformation step after Fork branch step.
    -- Insert Send step [the outcome of transformation step needs to be send]
    Design the above structure, if you have any doubts, dp reply back.
    Best regards,
    raj.

  • Can I control  filenaming when archiving  files using the file adapter?

    Hi folks,
    Is there anyway to control the filename used when the File Adapter writes out to an archive?
    Second question, I also need to be able to pass a "filename" to the adapter from an "input file." Is there a way to do this in the file adapter?
    Sincerely,
    lpac

    Hi,
    I have done that with the ftp adapter. In the .xsl file I wrote the following after the <xsl:stylesheet version="1.0" ....> tag:
    <xsl:variable name="INFILENAME" select="ehdr:getRequestHeader('/fhdr:InboundFTPHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;')"/>
    <xsl:template match="/">
    <xsl:variable name="OUTFILENAME"
    select="ehdr:setOutboundHeader('/fhdr:OutboundFileHeaderType/fhdr:fileName', $INFILENAME, 'fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/>
    <opaque:opaqueElement>
    <xsl:value-of select="/opaque:opaqueElement"/>
    </opaque:opaqueElement>
    </xsl:template>
    </xsl:stylesheet>
    To use this with the file adapter, you would have to wirte file where is written ftp.
    Hope this helps,
    Zaloa

  • Cannot process a Fixed Field Length file using the File Adapter (Sender)

    Hi -
    I have checked throughout these posts and blogs but I still have not been able to find a solution to my issue.  When using the File Adapter (Sender) I get a Conversion initialization failed with "xml.keyfieldName", no value found.  Why would I require a key field when I am using fixed field lenghts?  The file is comprised of 2 structures - 1 header and multiple details (see below).  There are no key fields in the flat file that I would be able to use.  Any suggestions?
    011000390      Customer Americas        20080605164317 000000000000000800000008000000000016000000                              
    12345678          100500       100500       Supplier 1                         0000000000030000002008040400                    
    12345678          100501       100501       Supplier 2                         0000000000052000002008042100 
    The File Adapter is configured as follows:
    Document Name = Rfchke00
    Document Namespace = 'my namespace'
    Recordset Name = Rfchke00
    Recordset Structure = Dtachkh,1,Dtachkp,*
    Recordset Sequence = Ascending
    Recordsets per Message = 1
    Key Field Type = String (Case-Sensitive)
    Dtachkh.fieldFixedLengths = 15,25,8,6,1,8,8,8,15,3,31
    Dtachkh.fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11
    Dtachkh.processFieldNames = fromConfiguration
    Dtachkp,fieldFixedLengths = 18,13,13,35,15,3,8,2,21
    Dtachkp,fieldNames = F1,F2,F3,F4,F5,F6,F7,F8,F9
    Dtachkp,processFieldNames = fromConfiguration
    Thanks,
    Dave

    Hi,
    you can use the module from which u can convert your structure to
    H011000390 Customer Americas 20080605164317 000000000000000800000008000000000016000000
    D12345678 100500 100500 Supplier 1 0000000000030000002008040400
    D12345678 100501 100501 Supplier 2 0000000000052000002008042100
    Please note the extra H,D in the struture added by the module.
    You can then use them as your key fieldValues.. The module should be deployed in Visual Admin and then can be used in the Module tab of your adapter CC
    While writing the content conversion after that please dont forget about the added new characters
    Please note also that i can find that the word supplier kept repeating in all the Dtachkp records
    Please use that
    Also if you feel that the field is of 13 characters and that would cause a problem dont worry... create a dummy field eg split tht 13 to two fields and use the common one as key field Value and identifier... as i see in ure case its like 500 Supplier , 502 Supplier . u can split the first 4 char and the remaing 9 char are key field value.
    try this out
    Rgds
    Aditya

  • How to customize the File Adapter to put the header line in a variable?

    I have a file in which the first line contains the number of records contained by the file itself.
    Like this:
    4
    record1
    record2
    record3
    record4
    where each record is a delimited list of values
    I need to validate that the records are actually 4.
    in the documentation of the File Adapter I see that you can declare the first line as "header", but I have the impression that in this case it would be simply ignored, and not stored in a variable for later use......
    Is this correct?
    Any trick or workaround?
    thank you soooo much!

    it worked like a charm,
    here is the XSD I have used:
    http://www.javamonamour.org/2010/12/soa-sutie-file-adapter-parsing-complex.html
    ( I don't seem to be able to display correctly XML in this post :o( )

  • Scheduling the file adapter

    Hi,
    i know that file adapter can't be schedualed, however my customer want to send me a message that a file has arrived and only then to wake XI to proccess it.
    I don't want to use BPM.
    Any thought of a workaround?

    Hi,
    I guess I have been seeing many requirements for 'scheduling XI messages' especially 'adapter-level scheduling'.
    'Adapter-level scheduling' ability is not currently available in SAP NW XI.
    What you can do is, make use of the 'Event-driven message processing' feature of SAP NW XI. What it means is, the adapter would pick up the message and it will be held in the XI pipeline for 'delayed message processing'. Then from the central scheduler you can send a trigger to XI to process the message.
    Here is a recorded Presentation on this topic:
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fd89cdb5-0b01-0010-6289-ac0ad1ccc5c0
    Here is a recorded Demo on how this can be configured using 'SAP Central Job Scheduling by Redwood' (any other central scheduler that is certified for BC-XBP can also be used):
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c0cfd2b5-0b01-0010-a8bd-c140d07d310c
    The recordings are available in the following Job Scheduling page (SDN -> SAP NetWeaver -> Plantform & Operations -> Administration -> SAP NW Central Job Scheduling by Redwood)
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/abb91c2a-0b01-0010-6ca6-9f0f62268454#idawk5oe [original link is broken]
    In the future you can expect something along the lines of 'a maintenance window at the Adapter/Channel level'. If and when this is made available, it may be possible to activate/deactivate the file adapter (i.e., the communication channel) from the central scheduler.
    Hope it is helpful.
    Thanks,
    Venky Varadadesigan
    Product Manager
    SAP NetWeaver
    M +1/832-287-2135
    mailto:[email protected]
    http://www.sap.com

  • "Performance" problems with the File adapter on Plain J2SE Adapter Engine

    Hi,
    At the moment I'm on a customer side to solve some XI issues for a few days. One of the issues is the performance of the Plain J2SE Adapter Engine, using the file adapter to transfer XML messages(already XI message format) from the legacy system to the Integration Engine. The File adapter has to deal with "large" XML messages(max at the moment is 65 Mb) and the engine fails with the following error when transferring the big XML file: "ERROR: Finished sending to Integration Engine with error "java.lang.OutOfMemoryError". Skip confirmation and quit this loop".
    As far I got the information from the customer the memory use of the Plain adapter engine is set to 512Mb. This is maybe to low. But I don't know where to look for this, I only have the adapter web interface in front of me, no access to the OS it self via for example remote connection.
    On the Integration Engine I know there is the ability to split large message with the file adapter(File Content Conversion), but I don't know this for the Plain Adapter Engine. Is there a possibility to do this also on the Plain Adapter Engine?
    Thanks in advance for any input.
    Greetings,
    Patrick

    Hi Sameer,
    Thanks for your answers.
    On the first solution, yes that is possible, we first decided to see if the legacy system can do the splitting, before starting developing a Java program.
    On the second solution, as far as I know is this solution possible on the Integration Engine. But we are facing the problems on the Plain J2SE Adapter Engine. I went trough that documentation(link:
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm ), to look for I similiar solution in the Plain Adapter Engine. So my question is, is this possible with the Plain Adapter? And if so, what kind of parameters I need to use to achieve this.
    Regards,
    Patrick

  • Passing file name dynamically to the file adapter

    Hi All,
    I'm using a file adapter to create a file from the XML message after mapping in XI. The file name is given in the file adapter configuration. Is it possible to have the file name as a part of the message and pass it to the file adapter dynamically? Or is it possible to have the file name in some variable or something in XI (like a BPM variable) and pass it to the adapter for every message?
    Does someone have any idea?
    Thanks,
    Sandeep

    Hi Sandeep,
    This is possible.
    For creating filenames dynamically for your sender, you will have to crate a variable name ( eg: %VAR%) as you file name and then you will have to give the name of your file under variable substitution. Just check this link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    In the case of receiver file adapaters, you have 5 options for file creation like,
    1.Create
    2.Append
    3. Add time stamp
    4.Add Counter
    5. Add Message ID
    You can choose any of these options or you can do it dynamically from you payload. Just check out this help link for more info,
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Hope this helps

Maybe you are looking for

  • ARE-1 creation with reference to multiple excise invoice

    Dear All, Please tell me how to create ARE-1 document with reference to multiple excise invoices which are having same sold to party and ship to party. Regards, Sagar Wairagade

  • Can not connect to Time Machine back up file after restore

    After receiving my G5 iMac back from the Apple Store I had to restore from my Time Machine backup (they had to erase the hard drive). The backup seemed to go fine until it hit the "Network settings." It froze there for a couple of hours. Everything e

  • Cannot download A97297-01.PDF

    I cannot download Administrator's Reference for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel, and Sun Solaris. A97297-01.PDF When I try I get the following Adobe Reader error message: "The file is damaged an c

  • If i get refunded for IAPS,will i still be able to use them ?

    Also If i have deleted the app and then reisntall it again can i get the iaps again ? And can i update a refunded app ? Thanks

  • Stop mail including headers on forward

    I have the latest version of Mountain Lion.  While this was not happening after the upgrade, at somepoint along the way something changed--by me or by Apple update.  I want to change it back. Details:  When I forward mail, Mail includes the full emai