I am trying to copy an existing dataset and unpack any packed fields. I ran into an issue where some of fields that where defined as packed were simply left as BLANKs, so I would like to print them out as BLANK vs the packed interpretation. When I tried the attached code (which is a simplified representation of what Im working with), it evaluates the first clause, but it does appear to evaluate the second clause where the overlay happens. Any suggestions?
I've toyed around with the selection logic, even duplicating the top clause into the bottom clause, but Im not able to get both clauses to evaluate - just the top.
Be kind here.. Im very inexperienced with SORT
Thanks in advance,
Ben
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(12,1,CH,EQ,C'A'),
BUILD=(1,3,
4,1,
5,7,
12,1,
13,3,
16,2,PD,M11),HIT=NEXT),
IFTHEN=(WHEN=(12,1,CH,EQ,C'A',AND,16,2,PD,NE,NUM),
OVERLAY=(16:C' '),