WorkOrders Subroutines
Work Order management - creation, status, traveler data
Subroutine count: 11
Table of Contents
VB_AUTOWO.ACT2VB_AUTOWO_CREATE.REV1VB_AUTOWO_CREATE.REV2VB_AUTOWO_MODIFY.REV1VB_AUTOWO_MODIFY.REV2VB_CREATE_WO.REV1VB_WO.EM.UPDVB_WO.VERIFYVB_WO.VERIFY.REV1VB_WO_OUTSIDE.1VB_WO_UNRELEASE.1
VB_AUTOWO.ACT2
Signature: SUBROUTINE VB_AUTOWO.ACT2(CO,WONO,MSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_AUTOWO.ACT2
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 3 |
| Description | Activates 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | WONO | in | Work order number to activate, or ‘ALL’ to activate all staged auto WOs |
| 2 | MSG | out | Status 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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 2 |
| Superseded By | VB_AUTOWO_CREATE.REV2 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | |
| 1 | DATA | out |
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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | List |
| Args | 2 |
| Description | Loads 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | DATA | out | Multi-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
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 5 |
| Superseded By | VB_AUTOWO_MODIFY.REV2 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | |
| 1 | WONO | in | |
| 2 | JOBNO | in | |
| 3 | WOQTY | in | |
| 4 | MSG | out |
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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | CRUD |
| Args | 6 |
| Description | Modifies 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | WONO | in | Work order number to modify |
| 2 | JOBNO | in | Job number (blank for stock, value for job assignment) |
| 3 | WOQTY | in | Work order quantity (integer, converted to MD3 internal format) |
| 4 | ROUTENO | in | Routing number for the work order |
| 5 | MSG | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 6 |
| Description | Creates 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | PARTNO | in | Part number for the work order |
| 2 | QTY | in | Quantity to produce (integer) |
| 3 | TYPE | in | Work order type: ‘JS’ for job-stock, other for standard |
| 4 | WONO | out | Generated work order number |
| 5 | MSG | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [INT] internal |
| Pattern | Internal |
| Args | 81 |
| Description | Work 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | ALLOCXREF | in | Pre-opened file handle: ALLOCXREF |
| 1 | ASSY.NOTES.XREF | in | Pre-opened file handle: ASSY.NOTES.XREF |
| 2 | ALTROUTE.HEAD | in | Pre-opened file handle: ALTROUTE.HEAD |
| 3 | ALTROUTE.LINE | in | Pre-opened file handle: ALTROUTE.LINE |
| 4 | ALTROUTE.NOTE | in | Pre-opened file handle: ALTROUTE.NOTE |
| 5 | BMF | in | Pre-opened file handle: BMF |
| 6 | BMF.ASSY.NOTES | in | Pre-opened file handle: BMF.ASSY.NOTES |
| 7 | BMF.NOTES | in | Pre-opened file handle: BMF.NOTES |
| 8 | CO.STDS.COST | in | Pre-opened file handle: CO.STDS.COST |
| 9 | CA.XREF | in | Pre-opened file handle: CA.XREF |
| 10 | CAP.REQ.LAB | in | Pre-opened file handle: CAP.REQ.LAB |
| 11 | CAP.REQ.LAB.XREF | in | Pre-opened file handle: CAP.REQ.LAB.XREF |
| 12 | CAP.REQ.MACH | in | Pre-opened file handle: CAP.REQ.MACH |
| 13 | CAP.REQ.MACH.XREF | in | Pre-opened file handle: CAP.REQ.MACH.XREF |
| 14 | COST.ACCOUNT | in | Pre-opened file handle: COST.ACCOUNT |
| 15 | DATAFILE | out | Data file name used for audit trail (set to ‘OPENWO’) |
| 16 | DTRANSREG | in | Pre-opened file handle: D TRANSREG (dict) |
| 17 | DPWD.AUDIT | in | Pre-opened file handle: D PWD.AUDIT (dict) |
| 18 | ITEMCA | in | Pre-opened file handle: ITEMCA |
| 19 | ITEMMANF | in | Pre-opened file handle: ITEMMANF |
| 20 | ITEMQTY | in | Pre-opened file handle: ITEMQTY |
| 21 | JOBTYPE | in | Pre-opened file handle: JOBTYPE |
| 22 | JOB.WO.XREF | in | Pre-opened file handle: JOB.WO.XREF |
| 23 | LOTHIST | in | Pre-opened file handle: LOTHIST |
| 24 | OPENWO | in | Pre-opened file handle: OPENWO |
| 25 | PWD.AUDIT | in | Pre-opened file handle: PWD.AUDIT |
| 26 | PRODUCT | in | Pre-opened file handle: PRODUCT |
| 27 | REQ | in | Pre-opened file handle: REQ |
| 28 | SROUTE.HEAD | in | Pre-opened file handle: SROUTE.HEAD |
| 29 | SROUTE.LINE | in | Pre-opened file handle: SROUTE.LINE |
| 30 | SROUTE.NOTE | in | Pre-opened file handle: SROUTE.NOTE |
| 31 | SF.CAL | in | Pre-opened file handle: SF.CAL |
| 32 | SF.CAL.WOCE | in | Pre-opened file handle: SF.CAL.WOCE |
| 33 | TRANSREG | in | Pre-opened file handle: TRANSREG |
| 34 | WIPBMF | in | Pre-opened file handle: WIPBMF |
| 35 | WIPBMF.NOTES | in | Pre-opened file handle: WIPBMF.NOTES |
| 36 | WIPBMFCOST | in | Pre-opened file handle: WIPBMFCOST |
| 37 | WIPBMF.ASSY.NOTES | in | Pre-opened file handle: WIPBMF.ASSY.NOTES |
| 38 | WO.ASSY.NOTES.XREF | in | Pre-opened file handle: WO.ASSY.NOTES.XREF |
| 39 | WIPROUTE.COST | in | Pre-opened file handle: WIPROUTE.COST |
| 40 | WIPROUTE.HEAD | in | Pre-opened file handle: WIPROUTE.HEAD |
| 41 | WIPROUTE.LINE | in | Pre-opened file handle: WIPROUTE.LINE |
| 42 | WIPROUTE.NOTE | in | Pre-opened file handle: WIPROUTE.NOTE |
| 43 | WOCE | in | Pre-opened file handle: WOCE |
| 44 | WIPLEDGER.AP | in | Pre-opened file handle: WIPLEDGER.AP |
| 45 | WIPLEDGER.HRS | in | Pre-opened file handle: WIPLEDGER.HRS |
| 46 | WIPLEDGER.LAB | in | Pre-opened file handle: WIPLEDGER.LAB |
| 47 | WIPLEDGER.MAT | in | Pre-opened file handle: WIPLEDGER.MAT |
| 48 | WIPLEDGER.OUT | in | Pre-opened file handle: WIPLEDGER.OUT |
| 49 | WIPLEDGER.SUM | in | Pre-opened file handle: WIPLEDGER.SUM |
| 50 | CO | in | Company number |
| 51 | NEWREC | in | New work order dimensioned record (MAT array) |
| 52 | OLDREC | in | Old work order dimensioned record (MAT array, for comparison) |
| 53 | ADDFLAG | in | Add flag: 1=new WO, 0=existing WO update |
| 54 | AUDIT | in | Audit trail flag (Y/N) |
| 55 | BEL | in | Terminal bell character |
| 56 | CRTNO | in | Terminal CRT number |
| 57 | CWS | in | Clear whole screen escape sequence |
| 58 | COPYFLAG | in | Copy flag for BOM copy mode |
| 59 | CES | in | Clear end-of-screen escape sequence |
| 60 | FCOMP | in | First component part number from BOM |
| 61 | FILE | in | File name for audit trail |
| 62 | FPER | in | Fiscal period for WIP cost rolling |
| 63 | INITS | in | User initials |
| 64 | KEY | in | Record key (CO!WONO) |
| 65 | PGM | in | Program name for audit trail |
| 66 | RCFLG | in | Recopy flag |
| 67 | SF.FLAG | in | Shop floor scheduling flag (Y/N) |
| 68 | SFCOREC | in | Shop floor company standards record |
| 69 | WONO | in | Work order number |
| 70 | WIPROLLFLAG | in | WIP roll flag (Y=roll standard costs on qty change) |
| 71 | YQFLAG | in | Yield/quality flag |
| 72 | PWDAUDREC | in | Password audit record data |
| 73 | MILSTDLAB | in | Military standard labor flag |
| 74 | COCE | in | Pre-opened file handle: COCE |
| 75 | JOBMASTER | in | Pre-opened file handle: JOBMASTER |
| 76 | PBSREC | in | PBS extension record for OPENWO.1287 |
| 77 | OPENWO.1287 | in | Pre-opened file handle: OPENWO.1287 |
| 78 | SROUTE.LINE.1287 | in | Pre-opened file handle: SROUTE.LINE.1287 |
| 79 | WIPROUTE.LINE.1287 | in | Pre-opened file handle: WIPROUTE.LINE.1287 |
| 80 | ALTROUTE.LINE.1287 | in | Pre-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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 4 |
| Description | Verifies 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | WONO | in | Work order number, or ‘UPDATE’ to process all WOs in WO.CLOSE.1287 |
| 2 | DATA | out | Verification 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 |
| 3 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 4 |
| Description | Enhanced 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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | WONO | in | Work order number, or ‘UPDATE’ to re-verify all WOs in WO.CLOSE.1287 |
| 2 | DATA | out | Verification 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 |
| 3 | MESSAGE | out | Error 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | CRUD |
| Args | 3 |
| Description | Updates the special outside routing flag (field 5) on the OPENWO.1287 extension record for a given work order. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | WONO | in | Work order number |
| 2 | FLAG | in | Special 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
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 1 |
| Description | Un-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:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | WONO | in | Work 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