Skip to Content
author's profile photo Former Member
Former Member

Script for File channel before OS command

Hi Experts,

We have two files sender communication channel,one file sender channel should pick files from NFS folder if file size is <= 1kb.Other file sender channel should pick file if file size is >1kb.

Can you please help me with unix command for the above logic.

Appreciate your help on this.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 28, 2016 at 02:55 AM

    Hi Mohan!

    At first it worth mention that if you need to pick up file according to its size OS script won't help you much as it works not before adapter picks the file but before it's transferred to messaging system.

    Why do you use two sender channels? If you have to determine receiver by the file size, you can do it in receiver determination by enabling ASMA attribute "Source file size" in sender channel and using so-called Context Object in receiver determination condition. Or what is your purpose?

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I am working on EDI 850 B2B scenario.

      We will can two kinds of EDI files in to same NFS folder (one file with single ISA, second file with multiple ISA).

      PO can't handle both kind of files using single EDI separator sender channel. It is either support multiple ISA segment or single ISA file but not both.

      If we check the ‘Receive split ISA’ option, It is working only for file with multiple ISA segments, but not for single ISA.

      If we uncheck the ‘Receive split ISA’ option, It is working only for file with single ISA segment, but not for multiple ISA.

      So I thought of creating two sender File channels, one for to pick single ISA (File size<=1 KB) file and with separate EDI Separate sender channel by unchecking the ‘Receive split ISA’ option. second channel to pick the multiple ISA segment (File size>1 KB) files and with separate EDI Separate sender channel by checking the ‘Receive split ISA’ option.

      Any help on how to achieve this.

      We have raised incident to SAP, meanwhile working on workaround in PO.

  • Posted on Jun 28, 2016 at 03:05 AM

    As Evgeniy said, you can use Context Object fileSize in the Receiver Determination to handle this.

    Use two Receiver BC/single one as per your requirement in Receiver Determination and use condition as per your requirement.

    For one fileSize > 1kb and for one <1kb

    Thanks,

    Apu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 28, 2016 at 06:04 PM

    Can anyone help on this.

    Appreciated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.