Usually, a "function out of place" call means that you've attempted to execute a function where it could not be executed (hence the "out of place" message). You gave a bit of a clue here:
The first line of the script attempts to pull data from our extract, and in WIP errors out with a function out of place error on GetData.
I don't know how you're calling the script, but my guess is that you're calling in at a point when the extract-data is no longer available -- e.g. in WIP. I suspect if you mapped the PostalCode to GVM during GENDATA processing, and then used GVM() to retrieve the value, this error would go away. But as I said this is just a guess based on the limited info here.
Hope this helps!
As Andy says, there are DAL functions that are only applicable in certain operating situations. There's a list that are only applicable during the assembly (Gendata) process. These would be specific to extract, triggering, and other assembly related functions. If you try to call those outside of that process, you would get the "out of place" message. Similarly, there are several WIP Functions that are only applicable during an entry process and likely could not be called during an assembly process.
If you bring up the DAL help and search for a topic "Where DAL Functions are Used" and see a table that identifies ones that are only applicable during the assembly (Gendata) process or WIP (Entry) process.
Glancing through the list, I think it needs some updating, because certain functions have expanded to be used in most places. Also the list does not identify those that might work in a Gendata (mapping/triggering) situation, but would be improper to use during a Genprint situation - as this might still be considered Rules Processing, but would not have access to the extract any longer.
Also, a search of the help for the topic "Documaker Server Functions" will provide a list of those specific to Gendata/assembly.