Using CHAIN to access a subfile record in FREE format ?

I would like to chain to a subfile record in FREE format.   I have done it is regular RPG, but get a compile error when I attempt it in the FREE.  Is this allowed?

I've attached a sample and error message.  

Thank You in advance!
Who is Participating?
Gary PattersonConnect With a Mentor VP Technology / Senior Consultant Commented:
Hi, Lynn,

The parentheses are confusing the compiler.  They make it think that you are supplying a list of key fields instead of a RRN.  Try this instead:


Also, X needs to be a numeric variable with zero decimal positions.

- Gary Patterson
Gary PattersonVP Technology / Senior Consultant Commented:
PS - Suggest you post into the code window instead of creating a Word doc.  Many people (me included) don't like to open Word docs off the internet, and it might limit the number of responses you get.

- Gary
lynn_harrisAuthor Commented:
Ahhh... makes since.  It is a numeric with zero decimal.  

Thank you. And thanks for the advice on now to post.

Enjoy the weekend.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.