A while ago there was a discussion in the System iNetwork forums taking its point of origin in the requirement of retrieving a job’s currently query attributes. This link will take you to the forum thread mentioned. A long time contributor in the forums, Elvis Budimlic of Centerfield Technology, chimed in and suggested how this could be done using a technique he’d described in a Centerfield Technology newsletter a while back. The example referred to showed how to retrieve FTP.
Having written a number of query attributes commands and presented them in this newsletter also a while back, I took this as an opportunity to complete my collection of query attribute commands. So based on Elvis’ technique I’ve now written a RTVQRYA command in RPG/IV. From a CL program you can use the RTVQRYA command, and from an RPG or Cobol program you’d call the CPP directly, using the returned information to determine if settings have been altered, if settings need to be changed, or as a way to save, change and later restore the current settings.