Initialize group_by

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Initialize group_by

Post by jyoung »

How do you initialize a group of fields using group_by?

This gives a "Assignment operator is not valid when used with field list identifier #MyFields" error.

Code: Select all

group_by name(#MyFields) fields(#wk_TotalOpen #wk_CurrentOpen #wk_TotalGross #wk_Open30 #wk_Open60 #wk_Open90 #wk_Open120 #wk_OpenOver120)

mthroutine name(#MyMethod)
#MyFields := 0
endroutine
All of the fields are a Packed(15,2) and I am trying to get them all to zero.

I can set them all individually, I just thought this was something I could do. Perhaps I am just having a brain melt-down. :D

Thanks,
Joe
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: Initialize group_by

Post by MarkDale »

This works for me

#MyFields := *NULL

(or #MyFields := *default)

It has to be a special value because a group of fields may contain different types of fields
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Initialize group_by

Post by jyoung »

Ugh. I knew I was having a melt down. lol.

Thanks!
Post Reply