View Full Version : Simple question -- passing date from screen to RPG source and back
Guest.Visitor
01-30-2002, 01:05 PM
hi Mike: So you have your "screen" defined to and are presenting it in the clp before calling the RPG program, right? IF so, I would move the screen to the rpg program (if you can) That is if this rpg program is not being used other places, and let the rpg process handle it. Otherwise, here's what I think. The clp will define a Cl variable as the SAME naem as the screen variable with a '&' appended to the front. ie: &orgpat#. when you call your rpg program, pass this and one other parm to your program. orgpat# and trupat#. When the rpg program returns or sets on LR, (comes back to the clp), branch back to the SNDRCVF command and redisplay your screen. You can 'fiddle' with the dds and indicators but I would K.I.S.S. Two screen fields that are passed to and received from the rpg.
mstrozier@hmstn.com
01-31-2002, 06:12 AM
I think this is a pretty straightforward simple issue I have. I haven't really been that big into screen design and passing varablies back and forth from the screen to the RPGLE source and back to the screen again. As I write conversion programs which don't require screens or anything. But this is what I am trying to do. I do however have the screen designed how I want it and named the variables within and so forth. Got a CL that I am using to call it as well which is no biggie. The trouble is passing it to the RPG and back to the screen. Problem. In the latest conversion I had to renumber history numbers and patient numbers for on this clients system. As they would have alpha characters in the numbering scheme to keep duplicates from occuring so that they can somewhat reuse the patinet numbers and so forth. Well our system doesn't allow alpha letters in them so those that were like that ended up getting renumbered to be unique. I am wanting to create a program that will allow the client to key in the original patient or history number, and once they hit enter it will then display the true patient or history number that it was renumbered to on our system. I have a DDS written for the screen with the varable names ORIPAT# and TRUPAT# (doing patinet number first). I have a CL that will call up the screen and created a RPG source named XRPAT#. Now this is where I am stuck. How do I pass the ORIPAT# from the screen to the RPG so that I can then chain out to the cross reference file and get the converted patient number then output that back to the screen? Any suggestions on what I am missing? Thanks for the help.
mstrozier@hmstn.com
01-31-2002, 06:12 AM
Thanks for the help but got it doing what I needed. And yes the KISS method is definalty in this :) hehe. I've got it passing the fields from the dds into my RPG program and back like I need. Just need to add some error handling incase the client keys something that isn't found in the file and so forth but other than that looking good. Thanks
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.