Purchasing Subroutines

Purchase Orders - PO inquiry, open PO tracking

Subroutine count: 17

Table of Contents


VB_OPENPOINQ.1

Signature: SUBROUTINE VB_OPENPOINQ.1(PONODATA,LINENODATA,BUYERDATA,PARTNODATA,PROMDATEDATA,DAYSDUEDATA,ORIGQTYDATA,OPENQTYDATA,UMDATA,VENDNODATA,VENDNAMEDATA,DESCDATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.1

PropertyValue
Status[X] deprecated
Args12
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0PONODATAout
1LINENODATAout
2BUYERDATAout
3PARTNODATAout
4PROMDATEDATAout
5DAYSDUEDATAout
6ORIGQTYDATAout
7OPENQTYDATAout
8UMDATAout
9VENDNODATAout
10VENDNAMEDATAout
11DESCDATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.1",
    "args":  {
 
             }
}

VB_OPENPOINQ.1.REV2

Signature: SUBROUTINE VB_OPENPOINQ.1.REV2(CO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.1.REV2

PropertyValue
Status[X] deprecated
Args2
Superseded ByVB_OPENPOINQ.1.REV3

Arguments:

IndexNameDirectionDescription
0COin
1DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.1.REV2",
    "args":  {
                 "0":  ""
             }
}

VB_OPENPOINQ.1.REV3

Signature: SUBROUTINE VB_OPENPOINQ.1.REV2(CO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.1.REV3

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternList
Args2
DescriptionRetrieves all currently open PO lines across all vendors and returns a 15-field data array including PO number, line, buyer, part, promise date, days due, quantities, vendor info, job number, and lead time.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1DATAoutMulti-valued array: <1>=PO no, <2>=line no, <3>=buyer, <4>=part no, <5>=promise date, <6>=days due, <7>=orig qty, <8>=open qty, <9>=UM, <10>=vendor no, <11>=vendor name, <12>=desc, <13>=PO entered date, <14>=job no, <15>=lead time

Tables Referenced: OPEN.PO.LINES, OPEN.PO.HEAD, PRODUCT, VENDOR, OPENWO, ITEMORD

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.1.REV3",
    "args":  {
                 "0":  ""
             }
}

VB_OPENPOINQ.2

Signature: SUBROUTINE VB_OPENPOINQ.2(CO,PARTNO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.2

PropertyValue
Status[X] deprecated
Args3
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1PARTNOin
2DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.2",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_OPENPOINQ.2.REV3

Signature: SUBROUTINE VB_OPENPOINQ.2(CO,PARTNO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.2.REV3

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args3
DescriptionReturns open PO line data for a specific part number. Looks up the part in the REQ (requirements) cross-reference to find associated PO lines, then returns a 14-field data array with PO details, vendor info, job number, and lead time.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number to look up open POs for
2DATAoutMulti-valued array: <1>=PO nos, <2>=line nos, <3>=buyers, <4>=promise dates, <5>=days due, <6>=orig qtys, <7>=open qtys, <8>=UMs, <9>=vendor nos, <10>=vendor names, <11>=descriptions, <12>=PO entered date, <13>=job no, <14>=lead time

Tables Referenced: OPEN.PO.LINES, OPEN.PO.HEAD, PRODUCT, VENDOR, REQ, OPENWO, ITEMORD

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.2.REV3",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_OPENPOINQ.3

Signature: SUBROUTINE VB_OPENPOINQ.2(CO,PO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.3

PropertyValue
Status[X] deprecated
Args3
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1POin
2DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.3",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_OPENPOINQ.3.REV3

Signature: SUBROUTINE VB_OPENPOINQ.2(CO,PO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.3.REV3

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args3
DescriptionReturns open PO line data for a specific PO number. Iterates through all lines of the given PO and returns a 14-field data array with line details, part info, vendor info, job number, and lead time.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1POinPurchase order number to inquire on
2DATAoutMulti-valued array: <1>=line nos, <2>=buyers, <3>=part nos, <4>=promise dates, <5>=days due, <6>=orig qtys, <7>=open qtys, <8>=UMs, <9>=vendor nos, <10>=vendor names, <11>=descriptions, <12>=PO entered date, <13>=job no, <14>=lead time

Tables Referenced: OPEN.PO.LINES, OPEN.PO.HEAD, PRODUCT, VENDOR, OPENWO, ITEMORD

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.3.REV3",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_OPENPOINQ.REV3

Signature: SUBROUTINE VB_OPENPOINQ.REV3(CO,REQTYPE,NUMBER,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.REV3

PropertyValue
Status[X] deprecated
Args4
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2NUMBERin
3DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.REV3",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_OPENPOINQ.REV4

Signature: SUBROUTINE VB_OPENPOINQ.REV4(CO,REQTYPE,NUMBER,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.REV4

PropertyValue
Status[X] deprecated
Args4
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2NUMBERin
3DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.REV4",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_OPENPOINQ.REV5

Signature: SUBROUTINE VB_OPENPOINQ.REV5(CO,REQTYPE,NUMBER,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.REV5

PropertyValue
Status[X] deprecated
Args4
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2NUMBERin
3DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.REV5",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_OPENPOINQ.REV6

Signature: SUBROUTINE VB_OPENPOINQ(CO,REQTYPE,NUMBER,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.REV6

PropertyValue
Status[X] deprecated
Args4
Superseded ByVB_OPENPOINQ.REV7

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2NUMBERin
3DATAout

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.REV6",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_OPENPOINQ.REV7

Signature: SUBROUTINE VB_OPENPOINQ(CO,REQTYPE,NUMBER,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_OPENPOINQ.REV7

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args4
DescriptionComprehensive open PO inquiry with multiple request types. Returns a 37-field data array with PO details, vendor info, priority, schedule dates, cost confirmation, outside operations, drop ship, line notes, received-no-cost info, stock area, and vendor email. REQTYPE selects the query mode.
Safe REQTYPEALL, PURCHASED, OSOPS, PART, PASTDUE, PO, RCVDNOCOST, VENDOR

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type (may include ’!’ delimiter with HISTDAYS): ‘ALL’=all open POs, ‘PURCHASED’=MRP type P only, ‘OSOPS’=outside operations, ‘PART’=by part number, ‘PASTDUE’=past-due non-manufactured, ‘PO’=by PO number, ‘RCVDNOCOST’=received without cost, ‘VENDOR’=by vendor number
2NUMBERinContext-dependent lookup key: part number (PART), PO number (PO), or vendor number (VENDOR). Unused for ALL/PURCHASED/OSOPS/RCVDNOCOST/PASTDUE.
3DATAoutMulti-valued 37-field array: <1>=PO no, <2>=line no, <3>=buyer, <4>=part no, <5>=promise date, <6>=days due, <7>=orig qty, <8>=open qty, <9>=UM, <10>=vendor no, <11>=vendor name, <12>=desc, <13>=PO date, <14>=job/WO no, <15>=lead time, <16>=vend phone, <17>=vend fax, <18>=priority, <19>=sched date, <20>=cost confirmed, <21>=MRP type, <22>=unit cost, <23>=op no, <24>=WO status, <25>=OS op prog, <26>=OS op date, <27>=PS no, <28>=drop ship, <29>=DS to, <30>=line note, <31>=action rqrd, <32>=PO line note, <33>=qty rcvd, <34>=bin list, <35>=qty list, <36>=stk area, <37>=vend email

Tables Referenced: ALLOCXREF, BINXREF, JOBPARTS.1287, JOBMASTER.1287, OPEN.PO.LINES, OPEN.PO.LINES.1287, OPEN.PO.HEAD, OPEN.PO.HEAD.1287, OPEN.PO.NOTES, PO.RECEIPT.1287, PRODUCT, PRODUCT.1287, VENDOR, VENDOR.1287, OPENWO, REQ, SROUTE.HEAD, SROUTE.LINE, ITEMORD, ITEMQTY, WIPROUTE.HEAD, WIPROUTE.LINE, WIPROUTE.LINE.1287, OPERATION, WORKJ7272C.1287, WORK.WIPLINE.1287, PROJECT.1287, CUSTOMER

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_OPENPOINQ.REV7",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  ""
             }
}

VB_PO.LINE.REV1

Signature: SUBROUTINE VB_PO.LINE(INDATA,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_PO.LINE.REV1

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args3
DescriptionLoads detailed data for a single PO line for the PO Line Editor. Returns vendor info, part details, four promise date/open qty pairs, line notes, action required, OS operation progress, and cost/date confirmation fields.

Arguments:

IndexNameDirectionDescription
0INDATAinInput parameters: <1>=company number, <2>=PO number, <3>=PO line number
1DATAoutPO line detail: <1>=vendor no, <2>=vendor name, <3>=vend phone, <4>=contact, <5>=vend email, <6>=PO date, <7>=part no, <8>=desc, <9,1-4>=promise dates, <10,1-4>=open qtys, <11>=line note, <12>=action rqrd, <13>=OS op prog, <14>=OS op date, <15>=date conf, <16>=cost conf
2MESSAGEoutError/status message

Tables Referenced: OPEN.PO.LINES, OPEN.PO.LINES.1287, OPEN.PO.HEAD, OPEN.PO.NOTES, PRODUCT, VENDOR, VENDOR.1287, WORK.WIPLINE.1287, PO.RECEIPT.1287

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_PO.LINE.REV1",
    "args":  {
                 "0":  ""
             }
}

VB_PO.RCT.REV1

Signature: SUBROUTINE VB_PO.RCT(INDATA,HDATA,LDATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_PO.RCT.REV1

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args4
DescriptionLoads PO receipt data for a given PO number. Returns header data (vendor, buyer, drop ship) and line-level detail (parts, quantities, MRP type, WO/job info, OS operations, cost confirmed, received quantities, bin assignments, stock area, line notes).

Arguments:

IndexNameDirectionDescription
0INDATAinInput parameters: <1>=company number, <2>=PO number
1HDATAoutPO header data: <1>=PO no, <2>=vendor no, <3>=vendor name, <4>=vend phone, <5>=buyer, <6>=drop ship flag
2LDATAoutPO line data (21-field array): <1>=PO no, <2>=line no, <3>=part no, <4>=desc, <5>=UM, <6>=MRP type, <7>=open qty, <8>=WO no, <9>=job no, <10>=op no, <11>=WO status, <12>=OS op prog, <13>=OS op date, <14>=PS no, <15>=cost conf, <16>=qty rcvd, <17>=bin no, <18>=bin qty, <19>=stk area, <20>=line note, <21>=action rqrd
3MESSAGEoutError/status message

Tables Referenced: JOBMASTER.1287, OPEN.PO.LINES, OPEN.PO.LINES.1287, OPEN.PO.HEAD, OPEN.PO.NOTES, PRODUCT, VENDOR, OPENWO, REQ, ITEMORD, WORKJ7272C.1287, WORK.WIPLINE.1287, PO.RECEIPT.1287

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_PO.RCT.REV1",
    "args":  {
                 "0":  ""
             }
}

VB_PO_BY_JOB.REV1

Signature: SUBROUTINE VB_PO_BY_JOB.REV1(CO,PARTNO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_PO_BY_JOB.REV1

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args3
DescriptionReturns open purchase order quantities grouped by job number for a given part. Looks up the part in the REQ cross-reference, finds all open PO lines, and aggregates open quantities by job (or STOCK if no job assigned).

Arguments:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number to look up PO quantities for
2DATAoutJob-level PO data: <1,N>=job number (or ‘STOCK’), <2,N>=on-hand qty (unused), <3,N>=on-order PO qty, <4,N>=allocated qty (unused)

Tables Referenced: OPEN.PO.LINES, OPEN.PO.HEAD, PRODUCT, VENDOR, OPENWO, REQ, ITEMORD

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_PO_BY_JOB.REV1",
    "args":  {
                 "0":  "",
                 "1":  ""
             }
}

VB_PO0161

Signature: SUBROUTINE VB_PO0161(DATAIN,DATAOUT,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_PO0161

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionExecutes the Purchase Order Receipts Register report batch process (program 0161). Runs SELECT commands, saves/gets lists, executes report programs (0161, 0161A, 0161B, 0161D), and clears work files. This is a batch process wrapper, not a data inquiry.

Arguments:

IndexNameDirectionDescription
0DATAINinInput parameters: <1>=company number, <2>=fiscal period, <3>=SELECT command, <4>=secondary SELECT command
1DATAOUToutOutput data (not populated in source; report output goes to printer/screen)
2MESSAGEoutError/status message

Tables Referenced: WORK0161

Tables Written: WORK0161

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_PO0161",
    "args":  {
                 "0":  ""
             }
}

VB_PO1250

Source: S:\LinuxShare\pro3prog\VBBASE\VB_PO1250

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args0
DescriptionInteractive terminal-based Purchase History by Vendor inquiry screen (program 1250). Uses PRINT/INPUT for screen I/O with paging and detail drill-down. Not callable as a subroutine from the API due to interactive terminal dependencies.

Tables Referenced: GL-COMPANY, PASSWORDS, POHIST, LOTHIST, REQ, TERMS, PRODUCT, PRODVEND, VENDOR, VENDXREF

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_PO1250",
    "args":  {
 
             }
}


Last updated: 2026-02-05 11:29 PM