craig villacorta dot com

//

Crossing applications without using a fragment

Posted by craigvillacorta on 080401

This example is written in ABS.PAT.main, and shows how to pull data from BAR.PAT.top (Meditech C/S).

Create a macro named “d” like so:

@SETUP.BAR.INDEX,
END

SETUP.BAR.INDEX
@account.number^BAR.PAT.number^ABS,
DO{@Next(BAR.PAT.account,BAR.PAT.number.x) .,
@BAR.PAT.account^BAR.PAT.account,
@DO.BAR.STUFF}

DO.BAR.STUFF
;blah
;blah

I set the BAR.PAT.number as the @account.number. A loop lets me use an index of choice — in this case BAR.PAT.number.x. Since that index’s first subscript is number, and I just set it in the previous step, NPR immediately finds that record, sets the BAR.PAT.account subscript, and then allows you to DO.BAR.STUFF.

Enter the following Footnotes:

AL START %Z.rw.fragment(”",”BAR.KIC”)
AL D d

The bogus fragment call simply opens a connection to BAR.DB.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>