ShopFloor Subroutines

Shop floor control and tracking

Subroutine count: 12

Table of Contents


VB_S0910

Signature: SUBROUTINE VB_S0910(CO,PGM,KEY,OLDREC,NEWREC,ACTION,DATAFILE,SKIP,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_S0910

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args9
DescriptionVB wrapper for S0910 transaction register posting. Compares old and new dynamic records attribute-by-attribute and writes a transaction audit record to TRANSREG for Add, Change, or Delete actions.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1PGMinProgram name that initiated the transaction
2KEYinRecord key being audited
3OLDRECinDynamic array of the original record before changes
4NEWRECinDynamic array of the new record after changes
5ACTIONinAction code: A=Add, C=Change, D=Delete
6DATAFILEinName of the data file being modified
7SKIPinValue-marked list of attribute numbers to skip (not audit)
8MSGoutError/status message

Tables Referenced: TRANSREG

Tables Written: TRANSREG, DICT TRANSREG

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_S0910",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  "",
                 "7":  ""
             }
}

VB_S0912

Signature: SUBROUTINE S0912(TRANSREG,DTRANSREG,CO,INITS,FILE,PGM,KEY,CRTNO,MAT OLDREC,MAT NEWREC,ACTION,DATAFILE,SKIP,CWS,BEL)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_S0912

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args15
DescriptionPosts a DIM(50) record comparison to TRANSREG for audit logging. Compares old and new dimensioned arrays attribute-by-attribute (including value and subvalue levels), skipping specified attributes, and writes the diff to the transaction register.

Arguments:

IndexNameDirectionDescription
0TRANSREGinPre-opened file handle to TRANSREG table
1DTRANSREGinPre-opened file handle to DICT TRANSREG
2COinCompany number
3INITSinUser initials
4FILEinSource file name (e.g. SFBASE)
5PGMinProgram name that initiated the change
6KEYinRecord key being audited
7CRTNOinTerminal/CRT number
8OLDRECinDimensioned array (50) of old record values (MAT)
9NEWRECinDimensioned array (50) of new record values (MAT)
10ACTIONinAction code: A=Add, C=Change, D=Delete
11DATAFILEinName of the data file being modified
12SKIPinValue-marked list of attribute numbers to skip (not audit)
13CWSinClear/write screen control sequence
14BELinBell character for terminal alerts

Tables Referenced: TRANSREG

Tables Written: TRANSREG, DICT TRANSREG

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_S0912",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  "",
                 "7":  "",
                 "8":  "",
                 "9":  "",
                 "10":  "",
                 "11":  "",
                 "12":  "",
                 "13":  "",
                 "14":  ""
             }
}

VB_S0923

Signature: SUBROUTINE S0923(TRANSREG,DTRANSREG,CO,INITS,FILE,PGM,KEY,CRTNO,MAT OLDREC,MAT NEWREC,ACTION,DATAFILE,SKIP,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_S0923

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args14
DescriptionPosts a DIM(75) record comparison to TRANSREG for audit logging. Same as S0912 but supports up to 75 attributes per record instead of 50. Compares old and new dimensioned arrays and writes the diff to the transaction register.

Arguments:

IndexNameDirectionDescription
0TRANSREGinPre-opened file handle to TRANSREG table
1DTRANSREGinPre-opened file handle to DICT TRANSREG
2COinCompany number
3INITSinUser initials
4FILEinSource file name (e.g. SFBASE)
5PGMinProgram name that initiated the change
6KEYinRecord key being audited
7CRTNOinTerminal/CRT number
8OLDRECinDimensioned array (75) of old record values (MAT)
9NEWRECinDimensioned array (75) of new record values (MAT)
10ACTIONinAction code: A=Add, C=Change, D=Delete
11DATAFILEinName of the data file being modified
12SKIPinValue-marked list of attribute numbers to skip (not audit)
13MSGoutError/status message (e.g. invalid action code)

Tables Referenced: TRANSREG

Tables Written: TRANSREG, DICT TRANSREG

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_S0923",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  "",
                 "7":  "",
                 "8":  "",
                 "9":  "",
                 "10":  "",
                 "11":  "",
                 "12":  ""
             }
}

VB_SF3081

Signature: SUBROUTINE SF3081(INDATA,OUTDATA,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3081

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionManufacturing lead time update. Calculates lead time from a standard routing using the critical ratio calculation and writes the result to ITEMORD attribute 11 for a given part number.

Arguments:

IndexNameDirectionDescription
0INDATAinInput data: <1>=part number to calculate lead time for
1OUTDATAoutCalculated manufacturing lead time value (workdays)
2MESSAGEoutError message if file open or processing fails

Tables Referenced: ALTROUTE.HEAD, ALTROUTE.LINE, CO.STDS.COST, CO.STDS.SF, ITEMORD, PRODUCT, SF.CAL, SF.CAL.WOCE, SROUTE.HEAD, SROUTE.LINE, WOCE

Tables Written: ITEMORD

API Call Example:

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

VB_SF3082

Signature: SUBROUTINE SF3082(JOBNO,WOLIST,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3082

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionPlanned dates calculation for WIP routing operations. Deletes existing capacity requirements then recalculates planned start/completion dates for work order operations. Supports single WO, job-based range, or ALL mode. Logs errors to DATE.PLAN.ERR.

Arguments:

IndexNameDirectionDescription
0JOBNOinJob number to filter work orders, or ‘ALL’ for all open production WOs; empty if using WOLIST
1WOLISTinValue-marked list of specific work order numbers (used when JOBNO is empty)
2MESSAGEoutStatus/error message (e.g. lead time warnings, validation errors)

Tables Referenced: CAP.REQ.LAB, CAP.REQ.LAB.XREF, CAP.REQ.MACH, CAP.REQ.MACH.XREF, CO.STDS.COST, CO.STDS.SF, GL-COMPANY, OPENWO, SF.CAL, SF.CAL.WOCE, WIPROUTE.HEAD, WIPROUTE.LINE, WOCE

Tables Written: DATE.PLAN.ERR, DICT DATE.PLAN.ERR

API Call Example:

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

VB_SF3180

Signature: SUBROUTINE SF3180(BEGCO,LSTCO)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3180

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args2
DescriptionCapacity requirements work file builder. Processes the active select list of open work orders, calculates planned dates via DATE.PLAN, and writes capacity requirement records and error logs. Called by SF3180A after SSELECT.

Arguments:

IndexNameDirectionDescription
0BEGCOinBeginning company number or ‘ALL’ for all companies
1LSTCOinLast company number in range (used when BEGCO is not ALL)

Tables Referenced: CAP.REQ.LAB, CAP.REQ.LAB.XREF, CAP.REQ.MACH, CAP.REQ.MACH.XREF, CO.STDS.COST, CO.STDS.SF, OPENWO, REQ, SF.CAL, SF.CAL.WOCE, WIPROUTE.HEAD, WIPROUTE.LINE, WOCE

Tables Written: DATE.PLAN.ERR, DICT DATE.PLAN.ERR

API Call Example:

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

VB_SF3180A

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3180A

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args0
DescriptionSelection criteria and initialization for capacity requirements work file generation (SF3180). Performs security verification, clears existing CAP.REQ files, selects open work orders from OPENWO, then calls VB_SF3180 to process them. This is a main program, not a callable subroutine.

Tables Referenced: COACCESS, CO.STDS.SF, GL-COMPANY

Tables Written: CAP.REQ.LAB, CAP.REQ.LAB.XREF, CAP.REQ.MACH, CAP.REQ.MACH.XREF

API Call Example:

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

VB_SF3180B

Signature: SUBROUTINE SF3180B(FLAG6810)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3180B

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args1
DescriptionLoads shop floor capacity requirements for MRP planned orders. Iterates through a pre-selected list of REQ records, looks up standard or alternate routings, adjusts quantities by yield, and calls VB_DATE.PLAN to calculate planned dates and write capacity requirement records. Logs errors to DATE.PLAN.ERR.

Arguments:

IndexNameDirectionDescription
0FLAG6810inFlag indicating if called from MRPBASE 6810 (controls CHAIN behavior on completion)

Tables Referenced: ALTROUTE.HEAD, ALTROUTE.LINE, CO.STDS.COST, CO.STDS.SF, ITEMORD, OPENWO, PRODUCT, REQ, SF.CAL, SF.CAL.WOCE, SROUTE.HEAD, SROUTE.LINE, WOCE

Tables Written: DATE.PLAN.ERR, DICT DATE.PLAN.ERR

API Call Example:

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

VB_SF3260

Signature: SUBROUTINE VB_SF3260(CO,WREC,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3260

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionSimulation work order entry and maintenance. Writes a work order record to OPENWO.SIM, creates or copies a WIP routing into WIPROUTE.SIM tables, and recalculates shop floor capacity via VB_DATE.PLAN. Allocates the next simulation work order number from CO.STDS.SF.

Arguments:

IndexNameDirectionDescription
0COinCompany number
1WRECinWork order record data to be written to OPENWO.SIM
2MSGoutError message if company lookup or file open fails

Tables Referenced: ALTROUTE.HEAD, ALTROUTE.LINE, ALTROUTE.NOTE, ALTROUTE.XREF, CAP.REQ.LAB, CAP.REQ.LAB.XREF, CAP.REQ.MACH, CAP.REQ.MACH.XREF, CAP.SIM.LAB, CAP.SIM.LAB.XREF, CAP.SIM.MACH, CAP.SIM.MACH.XREF, CATEGORY, CO.STDS.COST, CO.STDS.SF, CO.STDS.WIP, GL.CHARTS, GL-COMPANY, ITEMMANF, JOBMASTER, OPEN.PO.HEAD, OPEN.PO.LINES, OPENWO, OPENWO.SIM, PRODUCT, PRODXREF, SF.CAL, SF.CAL.WOCE, SROUTE.HEAD, SROUTE.LINE, SROUTE.NOTE, WIPROUTE.HEAD, WIPROUTE.LINE, WIPROUTE.NOTE, WIPROUTE.SIM.HEAD, WIPROUTE.SIM.LINE, WIPROUTE.SIM.NOTE, WOCE, WOCLASS, WOSTATUS, WOTYPE

Tables Written: CO.STDS.SF, OPENWO.SIM, WIPROUTE.SIM.HEAD, WIPROUTE.SIM.LINE, WIPROUTE.SIM.NOTE

API Call Example:

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

VB_SF3262

Signature: SUBROUTINE SF3062(JOBNO,WOLIST,MESSAGE)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3262

PropertyValue
Status[+] analyzed
Safety[WARN] dangerous
PatternProcess
Args3
DescriptionSimulation WIP operation planned dates update. Copies WIP routing data into simulation tables, deletes old simulation capacity requirement records, then recalculates planned start/completion dates via VB_DATE.PLAN. Supports ALL, job-based, or selective work order processing. Note: arguments are overridden internally (CO hardcoded to 1, JOBNO to ALL).

Arguments:

IndexNameDirectionDescription
0JOBNOinJob number to filter simulation work orders (currently overridden to ALL internally)
1WOLISTinValue-marked list of specific work order numbers for selective mode (currently overridden to empty internally)
2MESSAGEoutError/status message

Tables Referenced: CAP.REQ.LAB, CAP.REQ.LAB.XREF, CAP.REQ.MACH, CAP.REQ.MACH.XREF, CAP.SIM.LAB, CAP.SIM.LAB.XREF, CAP.SIM.MACH, CAP.SIM.MACH.XREF, CO.STDS.COST, CO.STDS.SF, GL-COMPANY, OPENWO, OPENWO.SIM, SF.CAL, SF.CAL.WOCE, WIPROUTE.HEAD, WIPROUTE.LINE, WIPROUTE.NOTE, WIPROUTE.SIM.LINE, WOCE

Tables Written: DATE.PLAN.ERR, DICT DATE.PLAN.ERR, WIPROUTE.SIM.HEAD, WIPROUTE.SIM.LINE, WIPROUTE.SIM.NOTE

API Call Example:

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

VB_SF3263A

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SF3263A

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args0
DescriptionSelection criteria and initialization for simulation capacity requirements work file generation (SF3263). Performs security verification, clears existing CAP.SIM files (LAB, LAB.XREF, MACH, MACH.XREF), then chains to SF3263B for processing. This is a main program, not a callable subroutine.

Tables Referenced: COACCESS, GL-COMPANY

Tables Written: CAP.SIM.LAB, CAP.SIM.LAB.XREF, CAP.SIM.MACH, CAP.SIM.MACH.XREF

API Call Example:

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

VB_SY0913

Signature: SUBROUTINE SY0913(PWD.AUDIT,DPWD.AUDIT,CO,INITS,FILE,PGM,KEY,CRTNO,MAT OLDREC,MAT NEWREC,ACTION,DATAFILE,PWDAUDREC,MSG)

Source: S:\LinuxShare\pro3prog\VBBASE\VB_SY0913

PropertyValue
Status[+] analyzed
Safety[INT] internal
PatternInternal
Args14
DescriptionPosts a DIM(75) record comparison to PWD.AUDIT for password audit logging. Extracts specific attribute/value positions from old and new dimensioned arrays as specified by PWDAUDREC, builds a transaction record, and writes it to PWD.AUDIT. Supports Add, Change, Delete, and Transfer action codes.

Arguments:

IndexNameDirectionDescription
0PWD.AUDITinPre-opened file handle to PWD.AUDIT table
1DPWD.AUDITinPre-opened file handle to DICT PWD.AUDIT (used for sequence counter)
2COinCompany number
3INITSinUser initials
4FILEinSource file name (e.g. SFBASE)
5PGMinProgram name that initiated the change
6KEYinRecord key being audited
7CRTNOinTerminal/CRT number
8OLDRECinDimensioned array (75) of old record values (MAT)
9NEWRECinDimensioned array (75) of new record values (MAT)
10ACTIONinAction code: A=Add, C=Change, D=Delete, T=Transfer
11DATAFILEinName of the data file being modified
12PWDAUDRECinAudit control record specifying which attribute.value positions to audit, with field descriptions and headers
13MSGoutError message (e.g. invalid action code)

Tables Written: PWD.AUDIT, DICT PWD.AUDIT

API Call Example:

POST /api/admin/subroutine/call
{
    "name":  "VB_SY0913",
    "args":  {
                 "0":  "",
                 "1":  "",
                 "2":  "",
                 "3":  "",
                 "4":  "",
                 "5":  "",
                 "6":  "",
                 "7":  "",
                 "8":  "",
                 "9":  "",
                 "10":  "",
                 "11":  "",
                 "12":  ""
             }
}


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