Passing Record Structure
Edis, Bob
BEdis@usbnc.org
Thu, 28 Feb 2002 09:43:11 -0600
G'day Merol
I believe the status of the record after a PUT depends on in which procedure
the PUT is placed and on the type of FILE.
For example, the default PUT in the UPDATE procedure has an implicit COMMIT
associated with it. However, a PUT in an INTERNAL procedure not call from
the UPDATE procedure, especially on a DESIGNER file may NEVER get committed.
Transaction control and explicit COMMIT statements may be required depending
on the code logic and database used.
Regards,
Blue
-----Original Message-----
From: Merol Newman [mailto:merol.newman@ramesys.com]
Sent: Thursday, February 28, 2002 6:53 AM
To: Ghadge,Sameer
Cc: powerh-l@lists.swau.edu
Subject: RE: Passing Record Structure
Hello Sameer
>From your previous questions on the list, I think you are in the unlucky
position of maintaining somebody else's (not very good) PH code. No wonder
you
are confused!
The PUT should be AFTER the call to screen prog_BBB, and as David says, you
need
to pass T-JNL-STATUS. Presumably prog_BBB sets T-JNL-STATUS according to
validation criteria. It will then be passed back to prog_AAA with the
potential
VS-JOURNAL-DRIVER record, which you can then decide whether to PUT or not.
I would suggest that
else null
should be replaced by
else put VS-JOURNAL-DRIVER
Another point - would anyone who knows better please correct me! When you
have
done a PUT, you no longer have the record in the buffer, so you have no
data to
pass to prog_BBB. If for some reason you wanted to PUT the record before
passing
it to the screen (which you don't) you would need to GET it again. (This
wouldn't apply to a PUT in an update procedure, where the user had entered
Update Stay.)
I hope this helps - good luck!
regards
Merol
merol.newman@ramesys.com
Ramesys, Eldon Way, Crick, Northamptonshire, UK. NN6 7SL
phone 01788 822133/823831, fax 01788 823601
> -----Original Message-----
> From: powerh-l-admin@cube.swau.edu
> [mailto:powerh-l-admin@cube.swau.edu]On Behalf Of Ghadge,Sameer
> Sent: 28 February 2002 11:25
> To:
> Subject: Passing Record Structure
>
>
> Hi,all,
> Pls give your inputs(kinda important)
>
> I have a code as follows :-
>
----------------------------------------------------------------------------
> --
> PROGRAM prog_AAA
> PROCEDURE INTERNAL JOURNAL
> BEGIN
> INFO "Creating journal..."
> ..
> ..
> .
> LET JNL1-BRANCH OF VS-JOURNAL-DRIVER = ISSUE-BRANCH OF VS-GEN-ISSUES
> ..
> ..
>
> PUT VS-JOURNAL-DRIVER
> LET T-JNL-STATUS = "N"
>
> ;Run journal screens
> RUN SCREEN prog_BBB PASSING VS-JOURNAL-DRIVER MODE E
>
> IF T-JNL-STATUS <> "Y"
> THEN ERROR "Journal details were not confirmed... voucher not issued"
> ELSE NULL
> END
>
----------------------------------------------------------------------------
> --
> now program prog_BBB has
> ..
> ..
>
> FILE VS-JOURNAL-DRIVER MASTER
> ..
> LET JOURNAL-NUMBER OF VS-JOURNAL-DRIVER = JOURNAL-NUMBER OF
VS-JOURNALS
>
----------------------------------------------------------------------------
> --
> and there is no "PUT VS-JOURNAL-DRIVER" stmt in prog_BBB.
>
> Does this means that program prog_BBB makes entries for the same record
in
> prog_AAA
>
> I am confused because of "PUT VS-JOURNAL-DRIVER" in prog_AAA,
> because ,if some validation fails in prog_BBB then no entries
> should be made in "VS-JOURNAL-DRIVER " ,but it seems that 'PUT' is
issued
> before.
>
>
>
> Highly Appreciate any help
> thx
> Sameer
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a subscriber.
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.