systemappsprogram.blogspot.com

Physical File Record AS400

\\Physical File Record AS400//

 d PGMNAME         pr
 d  TrgBuffer_                         like(TrgBuffer)
 d  TrgBufLen_                         like(TrgBufLen)

 d BefImg        e ds                  extname(FILENAME) prefix(b_)
 d AftImg        e ds                  extname(FILENAME) prefix(a_)
Related image
 d FILENAMER       pi
 d  p$TrgBuffer                        like(TrgBuffer)
 d  p$TrgBufLen                        like(TrgBufLen)

    TrgBuffer = p$TrgBuffer;
    TrgBufLen = p$TrgBufLen;

    NRO = NewRecOff + 1;
    NRL = NewRecLen;
    ORO = OrgRecOff + 1;
    ORL = OrgRecLen;

    // Set Before / After Images
    BefImg = %subst(TrgBuffer:ORO:ORL);
    AftImg = %subst(TrgBuffer:NRO:NRL);

    select;

    // Update
     when TrgEvent = '3';

     // Set last updated timestamp on record.
     a_lstupd = %timestamp();
     %subst(TrgBuffer:NRO:NRL) = AftImg;
     p$TrgBuffer = TrgBuffer; 
LAST_UPDATED for column LSTUPD
  timestamp not null
  generated always
  for each row on update
  as row change timestamp
Share:

No comments:

Translate

Popular Posts

Recent Posts

Support System Software

Customer support is usually one of the key aspects for all companies, both small and large enterprises. Having a reliable customer support system will result in a positive image of your brand and will be a clear sing that you actually care about your clients and put effort into keeping them satisfied. Our team of SaaS experts have collected and tested all popular customer support software services currently available in the market. Our list should allow you to more easily decide which solution will work best for your business. Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.