Midrange News for the IBM i Community

Posted by: neilrh
Jackson, MI
Multiformat - DSPATR(PC)
has no ratings.
Published: 26 Sep 2011
Revised: 23 Jan 2013 - 2185 days ago
Last viewed on: 16 Jan 2019 (4778 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Multiformat - DSPATR(PC) Published by: neilrh on 26 Sep 2011 view comments(3)

I have a screen built from multiple formats - say fmt1, fmt2, fmt3 & fmt4.


   write fmt1;
   write fmt2;
   write fmt3;
   exfmt fmt4;
   read fmt3;

 Fmt3 & Fmt4 have input capable fields, and I need to be able to indicate and error on these fields and force a position cursor.  From my experimentation: setting the indicators for fields on Fmt4 will result in color(red) and dspatr(pc) working.  But setting the indicatiors for fields on Fmt3 only results in color(red), the dspatr(pc) is ignored.

My assumption is that DSPATR(PC) only works on fields in the active record (in this case Fmt4).  Does anyone know of a way to get cursor position on Fmt3 fields without resorting to manual cursor placement OR making Fmt3 my active (If I make Fmt3 active then fields on Fmt4 won't dspatr(pc)!!).


Return to midrangenews.com home page.
Sort Ascend | Descend