Carlos,
I think you are missing the group name in the 2nd IF.
Michael
From: EDI-L@yahoogroups.com [mailto:EDI-L@yahoogroups.com] On Behalf Of
Carlos
Sent: Wednesday, August 21, 2013 8:10 AM
To: EDI-L@yahoogroups.com
Subject: [EDI-L] Gentran for Windows 5.1 856 looping question
Why don't you just write the PO# out to a global variable when you encounter it
and then use it at will wherever you want from then on out?
On start of doc PO = ; and again on start of HL = O loop PO = ;
When you encounter po# then PO = #fieldwhereIfoundPO
Then when you need to use it