Projects Subroutines
Project/Job management and master scheduling
Subroutine count: 7
Table of Contents
VB_JOB.COST.REV1VB_JOB.INVENTORYVB_JOB_BOM.REV1VB_JOB_BOM.REV2VB_JOB_BOM_WRITE.REV1VB_MASTER_SCHEDVB_PROJECT.REV1
VB_JOB.COST.REV1
Signature: SUBROUTINE VB_JOB.COST.REV1(INREC, OUTREC, MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB.COST.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | Process |
| Args | 3 |
| Description | Generates a job cost comparison report. Selects JOB.IP.1287 records for a given run date, calculates job cost vs WIP cost broken down by GL account (inventory, WIP, open PO, AR, SO, commission, pricing), and optionally prints a report and saves daily GL balance totals to GL.BAL.1287. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | INREC | in | Input parameters: <1>=print report flag (‘Y’ to print), <2>=close date cutoff (internal date; filters to closing jobs), <3>=run date (internal date for JOB.IP.1287 selection) |
| 1 | OUTREC | out | Multi-valued output: 24 attributes per job (job no, job cost, WIP cost, cost diff, GL account breakdowns for 1200/1210/1220/1235/1395/2719, open PO, UCAP, close date, open AR, open SO, commission, sell price, invoice price, price diff, PO error) |
| 2 | MESSAGE | out | Error or status message (e.g. ‘NO RECORDS SELECTED.’) |
Tables Referenced: JOB.IP.1287, PROJECT.1287, JOBMASTER
Tables Written: GL.BAL.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_JOB.COST.REV1",
"args": {
"0": ""
}
}VB_JOB.INVENTORY
Signature: SUBROUTINE VB_JOB.INTENTORY(CO,T.JOB,DATA,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB.INVENTORY
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Inquiry |
| Args | 4 |
| Description | Retrieves job-pegged inventory for a specific job number. Selects all LOTCOST records, reads lot history and bin data, and returns inventory items allocated to the specified job with part details, lot numbers, bin locations, and quantities. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | T.JOB | in | Job number to retrieve inventory for |
| 2 | DATA | out | Multi-valued output: <1>=job no, <2>=part no, <3>=description, <4>=location, <5>=lot no, <6>=bin no, <7>=bin qty, <8>=MRP code |
| 3 | MESSAGE | out | Error message |
Tables Referenced: BIN, CO.STDS.COST, COACCESS, GL-COMPANY, GL.CHARTS, POHIST, LOTHIST, LOTHIST.GL, PRODUCT, ITEMCA, ITEMQTY, JOBMASTER, WORKPBS1803.1287, CATEGORY, VENDOR, D WORKPBS1803.1287, INVHISTVAL.1287, LOTCOST
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_JOB.INVENTORY",
"args": {
"0": "",
"1": ""
}
}VB_JOB_BOM.REV1
Signature: SUBROUTINE VB_JOB_BOM.REV1(CO,REQTYPE,INCL.PARTS,NUMBER,DATA,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB_BOM.REV1
| Property | Value |
|---|---|
| Status | [X] deprecated |
| Args | 6 |
| Superseded By | VB_JOB_BOM.REV2 |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | |
| 1 | REQTYPE | in | |
| 2 | INCL.PARTS | in | |
| 3 | NUMBER | in | |
| 4 | DATA | out | |
| 5 | MESSAGE | out |
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_JOB_BOM.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": ""
}
}VB_JOB_BOM.REV2
Signature: SUBROUTINE VB_JOB_BOM.REV2(CO,REQTYPE,INCL.PARTS,NUMBER,DATA,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB_BOM.REV2
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [SAFE] safe |
| Pattern | Inquiry |
| Args | 6 |
| Description | Retrieves the WIP bill of materials hierarchy for a sales order or part number. Explodes the BOM recursively, returning priority, product, BOM level, WBS number, sequence, part number, description, MRP code, unit of measure, quantities, and parent drawing for each component. |
| Safe REQTYPE | SO, PART |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | REQTYPE | in | Request type: ‘SO’ for sales order BOM explosion, ‘PART’ for single part BOM explosion |
| 2 | INCL.PARTS | in | Part inclusion filter: ‘RAW’ for raw materials and purchased parts only, ‘ALL’ for all parts, ‘NONE’ for manufactured/document parts only |
| 3 | NUMBER | in | Multi-valued input: <1,1>=SO number or part number, <1,2>=quantity multiplier, <1,3>=WBS prefix |
| 4 | DATA | out | Multi-valued output (12 attributes): priority, product number, BOM level, WBS number, BOM sequence, part number, description, MRP, unit of measure, BOM quantity, qty/leg, parent drawing |
| 5 | MESSAGE | out | Error message (e.g. ‘INVALID REQUEST TYPE’) |
Tables Referenced: OPENWO, JOBXFER.1287, BMF, GL-COMPANY, ITEMMANF, PRODUCT, SROUTE.HEAD, SROUTE.LINE, OPEN.ORD.HEAD, OPEN.ORD.LINE, LOCKFILE, HOLD, BMF.NOTES, JOBPARTS.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_JOB_BOM.REV2",
"args": {
"0": "",
"1": "",
"2": "",
"3": ""
}
}VB_JOB_BOM_WRITE.REV1
Signature: SUBROUTINE VB_JOB_BOM_WRITE.REV1(CO,IDLIST,PRILIST,DATA,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB_BOM_WRITE.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 5 |
| Description | Writes job BOM priority data to the JOBPARTS.1287 file. Iterates through a value-marked list of IDs and writes each corresponding priority record. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number (not directly used in write key) |
| 1 | IDLIST | in | Value-marked list of JOBPARTS.1287 record IDs to write |
| 2 | PRILIST | in | Record-mark-separated list of priority records, one per ID in IDLIST |
| 3 | DATA | out | Output data (initialized to empty, not populated) |
| 4 | MESSAGE | out | Error or status message (initialized to empty) |
Tables Written: JOBPARTS.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_JOB_BOM_WRITE.REV1",
"args": {
"0": "",
"1": "",
"2": ""
}
}VB_MASTER_SCHED
Signature: SUBROUTINE VB_MASTER_SCHED(CO,JOBNO,JOBREC,MSG)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_MASTER_SCHED
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | Process |
| Args | 4 |
| Description | Writes a job record to the JOBMASTER.1287 file. Called by the VB Master Schedule application to persist job scheduling data. |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number (used as prefix in write key: CO + JOBNO) |
| 1 | JOBNO | in | Job number (concatenated with CO to form the JOBMASTER.1287 record key) |
| 2 | JOBREC | in | Complete job record (dynamic array) to write to JOBMASTER.1287 |
| 3 | MSG | out | Error message if file open fails |
Tables Written: JOBMASTER.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_MASTER_SCHED",
"args": {
"0": "",
"1": "",
"2": ""
}
}VB_PROJECT.REV1
Signature: SUBROUTINE VB_PROJECT(CO,REQTYPE,PROJECT,P1287REC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_PROJECT.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 6 |
| Description | CRUD operations for PROJECT.1287 records. Supports add, update, and delete with optional audit trail logging via S0910/TRANSREG. DELETE marks the project and logs the audit; add/update writes the record directly. |
| Dangerous REQTYPE | DELETE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | REQTYPE | in | Request type: ‘DELETE’ to delete the project record; any other value performs add/update |
| 2 | PROJECT | in | Project ID (used with CO to form record key CO!PROJECT) |
| 3 | P1287REC | in | Project record (dynamic array) to write to PROJECT.1287 |
| 4 | ADDFLAG | in | Add flag: true if adding a new record (used for audit trail action code) |
| 5 | MESSAGE | out | Status message (e.g. ‘DELETE SUCCEEDED’, ‘WRITE SUCCEEDED’) |
Tables Referenced: TRANSREG, D TRANSREG, PASSWORDS
Tables Written: PROJECT.1287
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_PROJECT.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": ""
}
}Last updated: 2026-02-05 11:29 PM