Topic
  • 2 replies
  • Latest Post - ‏2014-07-16T19:22:24Z by RichMcFate
Rshya
Rshya
24 Posts

Pinned topic How to Increment a value?

‏2014-07-13T17:16:41Z |

Hi All,

I am converting a NACHA file to EDI 820 format. How do I set ST02 field to increment. I have two customers in NACHA file, I am pulling data only for one customer in the EDI 820 format..so far I was successful, but how do I make ST02 Increment each time I get a new occurence of the same customer?

For Example: I have customer A and Customer B in the NACHA file, and I am pulling all the occurences of Customer B, so how do I increment ST02 for each customerB here?

Please help!

 

Thanks,

Rshya

  • Srini_IBM
    Srini_IBM
    1 Post

    Re: How to Increment a value?

    ‏2014-07-16T12:34:59Z  

    I think many ways to do that , Use Index($) , for each increment of record , try GETANDSET() , Thx

  • RichMcFate
    RichMcFate
    25 Posts

    Re: How to Increment a value?

    ‏2014-07-16T19:22:24Z  
    • Srini_IBM
    • ‏2014-07-16T12:34:59Z

    I think many ways to do that , Use Index($) , for each increment of record , try GETANDSET() , Thx

    I am really not a fan of using GETANDSET().  It requires opening an input card for write which means that you have no way to configure a map so that multiple instances can run simultaneously. 

    So far as I know there is nothing GETANDSET can do that can't be done more elegantly using INDEX($) or the [LAST] keyword.

    Rshya -- if you have the EDI pack, there's a good example of incrementing ST02 values in <installdir>/packs\edi_v2.8.1\x12\examples\ansi\potoedi