You are here: Development Standards > Routines > Application-SpecificRoutines > INITEM.PUB

# INITEM.PUB

INITEM.PUB is a public program that handles item ID input and corresponding item lookup functions. Use INITEM.PUB anywhere that an item ID is entered. You can control the way the entry program functions with the INGET$ variable.

`0060 ENTER FILE[ALL],INVE$,INLD$,INGET$,Y$,O2$,OSGUI$,GENINPUT$`

Variables | Description
FILE[ALL] | Standard file array used for the data file channel number
INVE$ | INVExxx file template (Item Master file)
INLD$ | INLDxxx file template (Location Detail file)
INGET$ | INITEM data template (see table below)
Y$ | Standard GENINPUT command string
O2$ | Inventory options string
OSGUI$ | Template for GUI functions
GENINPUT$ | Template used by GENINPUT.PUB. See the section on GENINPUT for variable details.

Exit Points | Explanation
EXIT | INITEM.PUB does not return any errors.

INGET$ String Template Definition

The INGET$ string template is used to pass information to the INITEM.PUB program. The fields in the string template are defined in the following table.

Field | Type | Len | Description
APP$ | C | 2 | Application calling INITEM.PUB. Used for determining whether to display customer or vendor alternates in the Customer/Vendor lookup. “IN” will allow both lookups
FORCE$ | C | 1 | Valid Item ID flag Y - force the user to enter a valid item ID N - allow an invalid item ID
BLANK$ | C | 1 | Blank Item ID flag Y - allow a blank item ID N - prevent a blank item ID
LOCA$ | C | 6 | Current location ID of the line item. If this value is set, INITEM.PUB will return the INLD$ template to the calling program
SRCE$ | C | 6 | Current vendor or customer of the line item
SUP$ | C | 1 | Supersede flag Y - check for supersedes N - do not check for supersedes
REP$ | C | 1 | Pick screen entry flag Y - report pick screen item ID prompt N - normal item ID entry
FOUND$ | C | 1 | Returned to calling program: Y - the item was found N - the item was not found
PROG$ | C | 1 | Maintenance flag Y - allow F6 maintenance N - do not allow F6 maintenance
MSG$ | C | 1 | Warning on Item ID change flag Y - print warning message if item is changed N - do not print a warning message
SVOK$ | C | 1 | Service item flag Y - allow service items N - do not allow service items
TTYP$ | C | 2 | Transaction type; should be the same as INUPD1.TTYP$
ALT$ | C | 20 | The alternate item ID that was entered by the user or set by one of the item searches
YDIS$ | C | 10 | GENINPUT.PUB’s YDISABLE$
STAT$ | C | 5 | List of valid item or item/location statuses for the function (for example, “ADO” allows active, discontinued and obsolete items only): A - active D - discontinued S - superseded O - obsolete K - kits
WND$ | C | 12 | Override F2 Inquiry window ID
SLV$ | C | 35 | Override F2 Inquiry SELVAL$ value
X0 | N | 2 | GENINPUT.PUB’s X0 screen position
X1 | N | 2 | GENINPUT.PUB’s X1 screen position
FLD_HLP$ | C | 12 | Field Help value for F1 help
GUI_WIND | N | 5 | Channel on which the GUI device X0 is open
GUI_ID | N | 5 | Control ID of Item ID