WorkOrders Subroutines

Work Order management - creation, status, traveler data

Subroutine count: 11

Table of Contents


VB_AUTOWO.ACT2

Signature: SUBROUTINE VB_AUTOWO.ACT2(CO,WONO,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_AUTOWO.ACT2

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionActivates auto-created work orders by moving them from OPENWO.AUTO.1287 staging to the live OPENWO table, creating WIP BOM and routing via VB_WO.EM.UPD. Processes a single WO or all staged WOs with a given prefix.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WONOinWork order number to activate, or ‘ALL’ to activate all staged auto WOs
2MSGoutStatus message returned (e.g. count of WOs activated or error)

Tables Written: OPENWO, OPENWO.1287, OPENWO.AUTO.1287

API Call Example:

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

VB_AUTOWO_CREATE.REV1

Signature: SUBROUTINE VB_AUTOWO_CREATE.REV1(CO,DATA)

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

PropertyValue
Status[X] deprecated
Args2
Superseded ByVB_AUTOWO_CREATE.REV2

Arguments:

IndexNameDirectionDescription
0COin
1DATAout

API Call Example:

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

VB_AUTOWO_CREATE.REV2

Signature: SUBROUTINE VB_AUTOWO_CREATE.REV2(CO,DATA)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_AUTOWO_CREATE.REV2

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternList
Args2
DescriptionLoads all auto work order staging data from OPENWO.AUTO.1287 and returns a multi-valued DATA array containing part info, quantities, job data, routing, dates, and flags for display in the VB UI. Writes back temp flags to staging records if not already set.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1DATAoutMulti-valued array of auto WO data (part, desc, WO#, job, qty, MOQ/EOQ, planned ord, gross req, safety, on-hand, on-order, route, due date, priority, MTS, no-BOM, job-SO, special-OS, start date)

Tables Written: OPENWO.AUTO.1287

API Call Example:

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

VB_AUTOWO_MODIFY.REV1

Signature: SUBROUTINE VB_AUTOWO_MODIFY.REV1(CO,WONO,JOBNO,WOQTY,MSG)

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

PropertyValue
Status[X] deprecated
Args5
Superseded ByVB_AUTOWO_MODIFY.REV2

Arguments:

IndexNameDirectionDescription
0COin
1WONOin
2JOBNOin
3WOQTYin
4MSGout

API Call Example:

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

VB_AUTOWO_MODIFY.REV2

Signature: SUBROUTINE VB_AUTOWO_MODIFY.REV2(CO,WONO,JOBNO,WOQTY,ROUTENO,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_AUTOWO_MODIFY.REV2

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternCRUD
Args6
DescriptionModifies an auto work order staging record in OPENWO.AUTO.1287 by updating the job number, quantity, and routing number. Allows changing job-to-stock or stock-to-job assignments.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WONOinWork order number to modify
2JOBNOinJob number (blank for stock, value for job assignment)
3WOQTYinWork order quantity (integer, converted to MD3 internal format)
4ROUTENOinRouting number for the work order
5MSGoutError message if modification fails, blank on success

Tables Written: OPENWO.AUTO.1287

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_AUTOWO_MODIFY.REV2",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  ""
             }
}

VB_CREATE_WO.REV1

Signature: SUBROUTINE VB_CREATE_WO.REV1(CO,PARTNO,QTY,TYPE,WONO,MSG)

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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args6
DescriptionCreates a new work order by generating the next WO number from CO.STDS.WIP.1287, building a default OPENWO record for the specified part and quantity, and writing it to OPENWO.AUTO.1287 staging. Returns the generated WO number and loads staging data for display.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1PARTNOinPart number for the work order
2QTYinQuantity to produce (integer)
3TYPEinWork order type: ‘JS’ for job-stock, other for standard
4WONOoutGenerated work order number
5MSGoutError or status message

Tables Written: CO.STDS.WIP.1287, OPENWO.AUTO.1287

API Call Example:

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

VB_WO.EM.UPD

Signature: SUBROUTINE VB_WO.EM.UPD(ALLOCXREF,ASSY.NOTES.XREF,ALTROUTE.HEAD,ALTROUTE.LINE,ALTROUTE.NOTE,BMF,BMF.ASSY.NOTES,BMF.NOTES,CO.STDS.COST,CA.XREF,CAP.REQ.LAB,CAP.REQ.LAB.XREF,CAP.REQ.MACH,CAP.REQ.MACH.XREF,COST.ACCOUNT,DATAFILE,DTRANSREG,DPWD.AUDIT,ITEMCA,ITEMMANF,ITEMQTY,JOBTYPE,JOB.WO.XREF,LOTHIST,OPENWO,PWD.AUDIT,PRODUCT,REQ,SROUTE.HEAD,SROUTE.LINE,SROUTE.NOTE,SF.CAL,SF.CAL.WOCE,TRANSREG,WIPBMF,WIPBMF.NOTES,WIPBMFCOST,WIPBMF.ASSY.NOTES,WO.ASSY.NOTES.XREF,WIPROUTE.COST,WIPROUTE.HEAD,WIPROUTE.LINE,WIPROUTE.NOTE,WOCE,WIPLEDGER.AP,WIPLEDGER.HRS,WIPLEDGER.LAB,WIPLEDGER.MAT,WIPLEDGER.OUT,WIPLEDGER.SUM,CO,MAT NEWREC,MAT OLDREC,ADDFLAG,AUDIT,BEL,CRTNO,CWS,COPYFLAG,CES,FCOMP,FILE,FPER,INITS,KEY,PGM,RCFLG,SF.FLAG,SFCOREC,WONO,WIPROLLFLAG,YQFLAG,PWDAUDREC,MILSTDLAB,COCE,JOBMASTER,PBSREC,OPENWO.1287,SROUTE.LINE.1287,WIPROUTE.LINE.1287,ALTROUTE.LINE.1287)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_WO.EM.UPD

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args81
DescriptionWork order entry and maintenance update subroutine. Performs the full update cycle for a work order: updates CA.XREF, REQ, ITEMQTY, WIPBMF/allocation files, JOB.WO.XREF, writes OPENWO record, creates WIP routing from standard routing, handles date planning and financial release.

Arguments:

IndexNameDirectionDescription
0ALLOCXREFinPre-opened file handle: ALLOCXREF
1ASSY.NOTES.XREFinPre-opened file handle: ASSY.NOTES.XREF
2ALTROUTE.HEADinPre-opened file handle: ALTROUTE.HEAD
3ALTROUTE.LINEinPre-opened file handle: ALTROUTE.LINE
4ALTROUTE.NOTEinPre-opened file handle: ALTROUTE.NOTE
5BMFinPre-opened file handle: BMF
6BMF.ASSY.NOTESinPre-opened file handle: BMF.ASSY.NOTES
7BMF.NOTESinPre-opened file handle: BMF.NOTES
8CO.STDS.COSTinPre-opened file handle: CO.STDS.COST
9CA.XREFinPre-opened file handle: CA.XREF
10CAP.REQ.LABinPre-opened file handle: CAP.REQ.LAB
11CAP.REQ.LAB.XREFinPre-opened file handle: CAP.REQ.LAB.XREF
12CAP.REQ.MACHinPre-opened file handle: CAP.REQ.MACH
13CAP.REQ.MACH.XREFinPre-opened file handle: CAP.REQ.MACH.XREF
14COST.ACCOUNTinPre-opened file handle: COST.ACCOUNT
15DATAFILEoutData file name used for audit trail (set to ‘OPENWO’)
16DTRANSREGinPre-opened file handle: D TRANSREG (dict)
17DPWD.AUDITinPre-opened file handle: D PWD.AUDIT (dict)
18ITEMCAinPre-opened file handle: ITEMCA
19ITEMMANFinPre-opened file handle: ITEMMANF
20ITEMQTYinPre-opened file handle: ITEMQTY
21JOBTYPEinPre-opened file handle: JOBTYPE
22JOB.WO.XREFinPre-opened file handle: JOB.WO.XREF
23LOTHISTinPre-opened file handle: LOTHIST
24OPENWOinPre-opened file handle: OPENWO
25PWD.AUDITinPre-opened file handle: PWD.AUDIT
26PRODUCTinPre-opened file handle: PRODUCT
27REQinPre-opened file handle: REQ
28SROUTE.HEADinPre-opened file handle: SROUTE.HEAD
29SROUTE.LINEinPre-opened file handle: SROUTE.LINE
30SROUTE.NOTEinPre-opened file handle: SROUTE.NOTE
31SF.CALinPre-opened file handle: SF.CAL
32SF.CAL.WOCEinPre-opened file handle: SF.CAL.WOCE
33TRANSREGinPre-opened file handle: TRANSREG
34WIPBMFinPre-opened file handle: WIPBMF
35WIPBMF.NOTESinPre-opened file handle: WIPBMF.NOTES
36WIPBMFCOSTinPre-opened file handle: WIPBMFCOST
37WIPBMF.ASSY.NOTESinPre-opened file handle: WIPBMF.ASSY.NOTES
38WO.ASSY.NOTES.XREFinPre-opened file handle: WO.ASSY.NOTES.XREF
39WIPROUTE.COSTinPre-opened file handle: WIPROUTE.COST
40WIPROUTE.HEADinPre-opened file handle: WIPROUTE.HEAD
41WIPROUTE.LINEinPre-opened file handle: WIPROUTE.LINE
42WIPROUTE.NOTEinPre-opened file handle: WIPROUTE.NOTE
43WOCEinPre-opened file handle: WOCE
44WIPLEDGER.APinPre-opened file handle: WIPLEDGER.AP
45WIPLEDGER.HRSinPre-opened file handle: WIPLEDGER.HRS
46WIPLEDGER.LABinPre-opened file handle: WIPLEDGER.LAB
47WIPLEDGER.MATinPre-opened file handle: WIPLEDGER.MAT
48WIPLEDGER.OUTinPre-opened file handle: WIPLEDGER.OUT
49WIPLEDGER.SUMinPre-opened file handle: WIPLEDGER.SUM
50COinCompany number
51NEWRECinNew work order dimensioned record (MAT array)
52OLDRECinOld work order dimensioned record (MAT array, for comparison)
53ADDFLAGinAdd flag: 1=new WO, 0=existing WO update
54AUDITinAudit trail flag (Y/N)
55BELinTerminal bell character
56CRTNOinTerminal CRT number
57CWSinClear whole screen escape sequence
58COPYFLAGinCopy flag for BOM copy mode
59CESinClear end-of-screen escape sequence
60FCOMPinFirst component part number from BOM
61FILEinFile name for audit trail
62FPERinFiscal period for WIP cost rolling
63INITSinUser initials
64KEYinRecord key (CO!WONO)
65PGMinProgram name for audit trail
66RCFLGinRecopy flag
67SF.FLAGinShop floor scheduling flag (Y/N)
68SFCORECinShop floor company standards record
69WONOinWork order number
70WIPROLLFLAGinWIP roll flag (Y=roll standard costs on qty change)
71YQFLAGinYield/quality flag
72PWDAUDRECinPassword audit record data
73MILSTDLABinMilitary standard labor flag
74COCEinPre-opened file handle: COCE
75JOBMASTERinPre-opened file handle: JOBMASTER
76PBSRECinPBS extension record for OPENWO.1287
77OPENWO.1287inPre-opened file handle: OPENWO.1287
78SROUTE.LINE.1287inPre-opened file handle: SROUTE.LINE.1287
79WIPROUTE.LINE.1287inPre-opened file handle: WIPROUTE.LINE.1287
80ALTROUTE.LINE.1287inPre-opened file handle: ALTROUTE.LINE.1287

Tables Written: CA.XREF, REQ, ITEMQTY, JOB.WO.XREF, OPENWO, OPENWO.1287, WIPROUTE.LINE

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_WO.EM.UPD",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  "",
                 "7":  "",
                 "8":  "",
                 "9":  "",
                 "10":  "",
                 "11":  "",
                 "12":  "",
                 "13":  "",
                 "14":  "",
                 "16":  "",
                 "17":  "",
                 "18":  "",
                 "19":  "",
                 "20":  "",
                 "21":  "",
                 "22":  "",
                 "23":  "",
                 "24":  "",
                 "25":  "",
                 "26":  "",
                 "27":  "",
                 "28":  "",
                 "29":  "",
                 "30":  "",
                 "31":  "",
                 "32":  "",
                 "33":  "",
                 "34":  "",
                 "35":  "",
                 "36":  "",
                 "37":  "",
                 "38":  "",
                 "39":  "",
                 "40":  "",
                 "41":  "",
                 "42":  "",
                 "43":  "",
                 "44":  "",
                 "45":  "",
                 "46":  "",
                 "47":  "",
                 "48":  "",
                 "49":  "",
                 "50":  "",
                 "51":  "",
                 "52":  "",
                 "53":  "",
                 "54":  "",
                 "55":  "",
                 "56":  "",
                 "57":  "",
                 "58":  "",
                 "59":  "",
                 "60":  "",
                 "61":  "",
                 "62":  "",
                 "63":  "",
                 "64":  "",
                 "65":  "",
                 "66":  "",
                 "67":  "",
                 "68":  "",
                 "69":  "",
                 "70":  "",
                 "71":  "",
                 "72":  "",
                 "73":  "",
                 "74":  "",
                 "75":  "",
                 "76":  "",
                 "77":  "",
                 "78":  "",
                 "79":  "",
                 "80":  ""
             }
}

VB_WO.VERIFY

Signature: SUBROUTINE VB_WO.VERIFY(CO,WONO,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_WO.VERIFY

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args4
DescriptionVerifies whether a work order is ready to close by checking for allocated material, incomplete operations, and critical dimensions. Writes verification data to WO.CLOSE.1287 and returns status in DATA. Supports single WO or bulk ‘UPDATE’ mode.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WONOinWork order number, or ‘UPDATE’ to process all WOs in WO.CLOSE.1287
2DATAoutVerification data: receipt date, bin, qty, allocated material flag, outside ops, in-house ops, critical dims, entered-by, percent complete, status, part, desc, notes, last bin, job number
3MESSAGEoutError or status message

Tables Written: WO.CLOSE.1287

API Call Example:

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

VB_WO.VERIFY.REV1

Signature: SUBROUTINE VB_WO.VERIFY(CO,WONO,DATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_WO.VERIFY.REV1

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args4
DescriptionEnhanced WO close verification. Checks allocated material, incomplete operations (distinguishing cost center), critical dimensions, and availability. Handles non-assembly WO types, reserved bins, finish locations, and paint flags. Writes verification data to WO.CLOSE.1287.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WONOinWork order number, or ‘UPDATE’ to re-verify all WOs in WO.CLOSE.1287
2DATAoutVerification data: receipt date, bin, qty, alloc-mtl, outside-ops, in-house-ops, crit-dim, entered-by, pct-complete, status, part, desc, notes, finish location or reserved bin, job, avail, WO type, paint flag
3MESSAGEoutError or status message

Tables Written: WO.CLOSE.1287

API Call Example:

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

VB_WO_OUTSIDE.1

Signature: SUBROUTINE VB_WO_OUTSIDE.1(CO,WONO,FLAG)

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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternCRUD
Args3
DescriptionUpdates the special outside routing flag (field 5) on the OPENWO.1287 extension record for a given work order.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WONOinWork order number
2FLAGinSpecial outside routing flag value to set

Tables Written: OPENWO.1287

API Call Example:

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

VB_WO_UNRELEASE.1

Signature: SUBROUTINE VB_WO_UNRELEASE.1(WONO)

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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args1
DescriptionUn-releases a work order by clearing the percent-complete (field 18) and release date (field 4) on the OPENWO record. Hardcoded to company 1.

Arguments:

IndexNameDirectionDescription
0WONOinWork order number to un-release

Tables Written: OPENWO

API Call Example:

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


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