Invoking Helproutine for other field

Is possible to do that ?

Scheme:
Field1 _ (HE=XXX) ------> F1 -----> invoke YYY for Field2
Field2 ___ (HE=YYY)

Field1 (A1)
Field2 (A3)

If you want to invoke YYY for Field1 in any case, why not set HE=YYY instead of HE=XXX ?

Because Filed1 is A1 type and Field2 is A3. I can’t define helproutine for Field1 as YYY, because YYY is for A3 field.

I need to change Field2 with helproutine YYY but through Field1. Field2 have to be hidden.

You don’t need 2 helproutines then, simply put (HE=‘XXX’,Field2) on Field1, this passes Field2 as a parameter to the helproutine and allows you to modify it from there.

Oh thanks;)

And one more thing… how to invoke helproutine with parameters from a program ?

You can’t “call” a help routine from a program, just force it to be executed with REINPUT USING HELP MARK *Field1 in which case the helproutine is executed with all parameters just like it does when you press PF1.

Or try SET CONTROL ‘Jyyy’, where yyy is the helproutine name. The parameters can be stacked, or AIV, or a number of other options.

Well, yes, but %J doesn’t invoke a “regular” field help routine, if that doesn’t matter, it may be an option.