Projects Subroutines

Project/Job management and master scheduling

Subroutine count: 7

Table of Contents


VB_JOB.COST.REV1

Signature: SUBROUTINE VB_JOB.COST.REV1(INREC, OUTREC, MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_JOB.COST.REV1

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternProcess
Args3
DescriptionGenerates 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:

IndexNameDirectionDescription
0INRECinInput 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)
1OUTRECoutMulti-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)
2MESSAGEoutError 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

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args4
DescriptionRetrieves 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:

IndexNameDirectionDescription
0COinCompany number
1T.JOBinJob number to retrieve inventory for
2DATAoutMulti-valued output: <1>=job no, <2>=part no, <3>=description, <4>=location, <5>=lot no, <6>=bin no, <7>=bin qty, <8>=MRP code
3MESSAGEoutError 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

PropertyValue
Status[X] deprecated
Args6
Superseded ByVB_JOB_BOM.REV2

Arguments:

IndexNameDirectionDescription
0COin
1REQTYPEin
2INCL.PARTSin
3NUMBERin
4DATAout
5MESSAGEout

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

PropertyValue
Status[+] analyzed
Safety[SAFE] safe
PatternInquiry
Args6
DescriptionRetrieves 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 REQTYPESO, PART

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type: ‘SO’ for sales order BOM explosion, ‘PART’ for single part BOM explosion
2INCL.PARTSinPart inclusion filter: ‘RAW’ for raw materials and purchased parts only, ‘ALL’ for all parts, ‘NONE’ for manufactured/document parts only
3NUMBERinMulti-valued input: <1,1>=SO number or part number, <1,2>=quantity multiplier, <1,3>=WBS prefix
4DATAoutMulti-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
5MESSAGEoutError 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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args5
DescriptionWrites job BOM priority data to the JOBPARTS.1287 file. Iterates through a value-marked list of IDs and writes each corresponding priority record.

Arguments:

IndexNameDirectionDescription
0COinCompany number (not directly used in write key)
1IDLISTinValue-marked list of JOBPARTS.1287 record IDs to write
2PRILISTinRecord-mark-separated list of priority records, one per ID in IDLIST
3DATAoutOutput data (initialized to empty, not populated)
4MESSAGEoutError 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

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args4
DescriptionWrites a job record to the JOBMASTER.1287 file. Called by the VB Master Schedule application to persist job scheduling data.

Arguments:

IndexNameDirectionDescription
0COinCompany number (used as prefix in write key: CO + JOBNO)
1JOBNOinJob number (concatenated with CO to form the JOBMASTER.1287 record key)
2JOBRECinComplete job record (dynamic array) to write to JOBMASTER.1287
3MSGoutError 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

PropertyValue
Status[+] analyzed
Safety[COND] conditional
PatternCRUD
Args6
DescriptionCRUD 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 REQTYPEDELETE

Arguments:

IndexNameDirectionDescription
0COinCompany number
1REQTYPEinRequest type: ‘DELETE’ to delete the project record; any other value performs add/update
2PROJECTinProject ID (used with CO to form record key CO!PROJECT)
3P1287RECinProject record (dynamic array) to write to PROJECT.1287
4ADDFLAGinAdd flag: true if adding a new record (used for audit trail action code)
5MESSAGEoutStatus 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