Page 1 of 1

Restructure stages- vectors, subrecord, column imports etc

Posted: Thu Nov 29, 2007 10:43 am
by dohertys
Forgive my ignorance but I'm trying to learn about the restructure stages so that I'll be able to spot when they'd be useful.

Can anyone give me an explanation of a subrecord and a vector.
Does column import/exports work on subrecords or vectors - what's the difference.

Are vectors always within subrecords or are they totally different.

Why would you use these stages? I can see that it might be usefull when passing data into another system if they require there data in that format, but is there any reason to create subrecords and the promote them later in your job?

Thanks

Posted: Thu Nov 29, 2007 2:17 pm
by ray.wurlod
They are totally different.

Vectors typically arise from single-element OCCURS in COBOL-generated data - every element in the vector must have the same data type. The number of elements in the vector may be fixed or variable; in the latter case there must be another field in the record containing the number of elements in a vector.

A subrecord is just what it sounds like - a record stuffed into a single field. These arise from higher-level items in a COBOL-generated record, but are also used to report the "before" and "after" inputs in a Compare stage.

There is also a tagged subrecord - a single field containing a subrecord, but the structure of that subrecord may contain different information in different records, depending on a "tag value" elsewhere in the record. For example a "dependents" subrecord in an employees record may contain DOB for child dependents but not for parent dependents, and may contain address information for parents but not for children.