Versions of P4211

cazinpa

Member
All,

The person who used to manage our system has set up multiple versions of the P4211 order entry program. There is a "new order" menu selection as well as an "edit after print".

The new order program sets the status to 520/540. The edit program sets the status to 540/560 for orders that have already been batched.

The problem that I have is that the users keep using the "edit after print" to enter new orders.

My first question is - is there a way to edit the version to disallow new order entry - only allowing the edit of existing orders?

My second question is - how is this normally handled? If one were using the G4211 menu it would appear that everything can be handled by one version.

Thanks for any ideas,
Andy Zook
 
Andy-

I'm not sure that action code security gives you what you need in this case,
so if you have the luxury of modifying P4210 and P4211, I'd suggest making the following change to both programs:

1) For maximum flexibility by version, add a new processing option called 'Disallowed action codes' to the processing options for P4211.

Then, to disallow Add and Change, for example, you would put 'AC' in this new processing option.
or to disallow only Add, put 'A' in the processing option, etc.

2) The array @NAC contains five one-byte elements and each element represents (in order) the action codes Add, Change, Delete, Inquire, and Print.
(as a memory aid: 'ACDIP')

The C0001 subroutine checks the elements of @NAC, and if NON-blank, disallows the associated action code.

In each program, in S999 find where the array @NAC gets initialized,
and make the following modification, based on the value(s) contained in the new processing opton:

(I'll leave the detailed programming aspects up to you)

Examples:
So, to disallow Add, you would set @NAC to '1 '
To disallow Change, you would set @NAC to ' 1 '
To disallow Delete, you would set @NAC to ' 1 '
To disallow Add and Delete you would set @NAC to '1 1 '
To disallow

Then you can set up one version that allows Adds, and another version that disallows Adds.

Regards,
 
Back
Top