Promote Subrecord stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Promote Subrecord stage

Post by FranklinE »

I searched all the forums for anything on this error message, and got two hits that offered nothing about it beyond the mere mentioning of it.

It compiles cleanly. At runtime it dies on main_program: Fatal Error: Not an aggregate field. [api/schema/schema.C:2173], not one detail offered or found with every messaging environment variable I could find set to "true".

The OSH code from Director:
#### STAGE: Promote_Subrecord_200
## Operator
promotesubrec
## Operator options
-subrecname 'SFR1_REC'

## General options
[ident('Promote_Subrecord_200'); jobmon_ident('Promote_Subrecord_200')]
## Inputs
0< [] 'FLTR_RECTYPE:fltro_rectype_01.v'
## Outputs
0> [modify (
keep
SFR1_ID,SFR1_REC0,SFR1_REC1,SFR1_REC2,
SFR1_REC3,SFR1_REC4,SFR1_REC5,SFR1_REC6,
SFR1_REC7,SFR1_REC8;
)] 'Promote_Subrecord_200:spvo_rectype_01.v'
;
The _ID column is a pass-through column only. I've also tried this with dropping it and just having the one column with the same results.
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Would you be able to post the schema of the dataset used as input?
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

mhester wrote:Would you be able to post the schema of the dataset used as input?
Thanks for asking. I should also add that I can use a Transformer stage and substring derivations without any problem. I do have a medium performance concern, or I wouldn't be trying to avoid using the Transformer.

-schema record
{record_length=fixed, delim=none, ebcdic, binary, fix_zero}
(
SFR_ID:string[2];
SFR_RECORD:string[98];
)

That's it. In case it also helps, the output schema:
-schema record
{record_length=fixed, delim=none, ascii, text, fix_zero}
(
SFR1_ID:string[2];
SFR1_REC0:decimal[10,0] {zoned, default=0};
SFR1_REC1:decimal[10,0] {zoned, default=0};
SFR1_REC2:decimal[6,0] {zoned, default=0};
SFR1_REC3:decimal[4,0] {zoned, default=0};
SFR1_REC4:decimal[4,0] {zoned, default=0};
SFR1_REC5:decimal[4,0] {zoned, default=0};
SFR1_REC6:decimal[2,0] {zoned, default=0};
SFR1_REC7:string[1];
SFR1_REC8:string[57];
)
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Thanks and by the looks of your input dataset schema you are not dealing with a subrec, but a normal dataset. In order to use the promote subrec operator you must have built a subrec.

The subrec is actually nothing that you can manipulate in the traditional way within your flow except to use other restructure stages with them.

If you can give me a bit more information regarding what you are attempting to accomplish I would be more than happy to help you out with possible solutions.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

mhester wrote:Sorry, did not mean to post that twice!
Unposted. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Thanks for asking. I should also add that I can use a Transformer stage and substring derivations without any problem. I do have a medium performance concern, or I wouldn't be trying to avoid using the Transformer.
Actually glossed over this part, but I cannot think of too many reasons to avoid a transform - they are pretty speedy. The restructure stages obfuscate metadata and "can" make maintenance and understanding a bit more difficult. Also, these stages do not imply greater efficiency or performance, just a different tool in the toolbox :)
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

mhester wrote:...I cannot think of too many reasons to avoid a transform - they are pretty speedy. The restructure stages obfuscate metadata and "can" make maintenance and understanding a bit more difficult. Also, these stages do not imply greater efficiency or performance, just a different tool in the toolbox :)
Thanks, Mike. That's excellent advice considering that my other motivation was coding convenience. The restructure stages are simpler than the Transformer.
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

The restructure stages are simpler than the Transformer
Well said and I agree - nice to see folks actually using these stages :)
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

The restructure stages are simpler than the Transformer
Well said and I agree - nice to see folks actually using these stages :)
mhester
Participant
Posts: 622
Joined: Tue Mar 04, 2003 5:26 am
Location: Phoenix, AZ
Contact:

Post by mhester »

Ok - not sure why I get the double posts! I submitted only once!

Craig, do your magic and remove one please :)
Post Reply