Synon 2E Exploring messages via SQL
Bitesized post today.
I needed to query the model to see if a particular function was called in second level message text. I also wanted to see if it was referenced in the message name or the message text just to make sure I tracked down all usages.
The simple solution was to join the two files from the 2E model and do a little check to see if my string (PGM in this instance) was mentioned.
For more on the underlying files in 2E, take a look at these posts from many years ago.
https://leedare-plex2e.blogspot.com/search/label/model%20files
Thanks for reading the
p.s. Remember to have your library list pointing to the correct model!
I needed to query the model to see if a particular function was called in second level message text. I also wanted to see if it was referenced in the message name or the message text just to make sure I tracked down all usages.
The simple solution was to join the two files from the 2E model and do a little check to see if my string (PGM in this instance) was mentioned.
SELECT a.@@MSG, a.MSG, a.TYPOPT, b.SECLVL FROM YMSGDTARFP a LEFT JOIN YMSGSECRFP b ON a.@@MSG = b.@@MSG WHERE a.MSG like '%MYSTRING%' OR a.TYPOPT LIKE '%MYSTRING%' OR b.SECLVL LIKE '%MYSTRING%'
For more on the underlying files in 2E, take a look at these posts from many years ago.
https://leedare-plex2e.blogspot.com/search/label/model%20files
Thanks for reading the
Synon 2E and Plex Emporium by Lee Dare (A developer blog).
Lee.
p.s. Remember to have your library list pointing to the correct model!
Comments
Post a Comment
Thanks for considering leaving some comments about my random rants for everything software development and more.