Sublists - V Code
File items containing sublists are accessed through the COUNT and LIST commands and the WITHIN modifier. For the commands and the modifier to function properly, you must include the V processing code in attribute 8 of the file definition item.
Syntax
V;;sublist-AMC
Syntax Elements
sublist-AMC is the number of the attribute containing the sublist.
Example
Consider an ASSEMBLIES file with each data item containing details of parts related to a servo motor. The ASSEMBLIES file's DICT contains the file definition item ASSEMBLIES and three data definition items as follows:
DESC
SUB.ASSEM
STOCK
Note
Setting up data definition items is described in the topic Data Definition Item.
The file definition item ASSEMBLIES contains the following attributes:
ASSEMBLIES
001 D
002 MANUFACTURING/ASSEMBLIES,ASSEMBLIES
003 B3 1,1
004
005
006
007
008 V;;2 Attribute 2 of each data item contains a sublist
009 L
010 10
The parts are listed according to levels as shown in the diagram below.
The level 1 item is made up of level 2 items and level 2 items are made up of items in level 3.
The subassemblies that make up the SERVO are in item A200. The subassemblies that make up the DC MOTOR are referenced in item A201, and so forth as listed in Assembly Structure.
Sample Report
With the file set up as shown in Assembly Structure, you can generate the report shown below.
A200 001 SERVO 002 A201]A202]A203 003 74 A201 001 DC MOTOR 002 A210]A211 003 35 A202 001 SERVO BOARD 002 003 17 A203 001 SERVO HOUSING 002 A212]A213 003 18 A210 001 MOTOR PLATFORM 002 003 23 A21 001 POWER UNIT 002 003 31 A212 001 HOUSING SEALS 002 003 32
:LIST WITHIN ASSEMBLIES 'A200' DESC SUB.ASSEM STOCK PAGE 1 LEVEL ASSEMBLIES Description...... Subassembly. Stock 1 A200 SERVO A201 74 A202 A203 2 A201 DC MOTOR A210 35 A211 3 A210 MOTOR PLATFORM 23 3 A211 POWER UNIT 31 2 A202 SERVO BOARD 17 2 A203 SERVO HOUSING A212 18 A213 3 A212 HOUSING SEALS 32 7 ITEMS LISTED