Gen EDGE

 View Only
  • 1.  Looking for inline coding examples

    Posted Oct 26, 2018 02:43 PM

    Are there any documents or papers that can be shared which give more details and examples of inline coding in Action Blocks?   One with an example of what all is needed to execute SQL from inline code in COBOL would be most helpful.  I've found the inline code sections in the regular Gen documentation but was wondering if anyone had an additional, more specific document they'd be willing to share........ Thanks



  • 2.  Re: Looking for inline coding examples

    Broadcom Employee
    Posted Apr 30, 2019 02:30 PM

    Hi S_Pickett

    totally missed your question but just in case you are still looking for it...please see the example as attached pic.

     

    inline code, ILC, SQL , cobol

     

    Regards,

    Amit



  • 3.  RE: Re: Looking for inline coding examples

    Posted Feb 25, 2021 09:54 AM

    hi Amit,

    is there any way of encoding a paragraph within the code section.  I've tried this, but unable to get an text into area-A.

    I get a compiler error (as expected):
    ==001070==> IGYPS2010-E Procedure-name "1100-PACK-3-BYTES" was found in area "B" followed by a
    period or section. The procedure-name was processed as if found in area "A".


    Jonathan




  • 4.  RE: Re: Looking for inline coding examples

    Broadcom Employee
    Posted Feb 25, 2021 01:35 PM
    Edited by AMIT KUMAR DWIVEDI Feb 25, 2021 01:58 PM


  • 5.  RE: Re: Looking for inline coding examples

    Broadcom Employee
    Posted Feb 25, 2021 02:17 PM
    Hi Jonathan,
     
    If you specify a Code Name for your Inline Code statement then the logic written in the Code section will be placed in a separate paragraph.  That paragraph will be named whatever you specified in the Code Name field, but the logic will not be executed at that point.  To actually execute that paragraph, you would need to add a second Inline Code statement that contained logic to PERFORM that paragraph.  This second Inline Code statement needs to be placed in the PAD logic wherever you want the actual execution to occur.
     
    So, for example, if your first Inline Code statement was given a Code Name of 1100-PACK-3-BYTES, all the logic in the Code section would be contained in the 1100-PACK-3-BYTES paragraph.  You would then need to add a second Inline Code statement (without a Code Name) that contains the following line:
     
    PERFORM 1100-PACK-3-BYTES THRU 1100-PACK-3-BYTES-EXIT.
     
    Does this answer your question?
     
    Thanks,
    Clay


  • 6.  RE: Re: Looking for inline coding examples

    Posted Feb 25, 2021 09:20 PM
    hi Amit,

    Thanks for the quick response,

    yes, exactly what I was looking for !