Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I can tell you what the statements do, but without knowing what the input records look like, what you are trying to accomplish and what the expected output is, I can't tell you why those control statements are being used.
INREC statement: If position 147 has a C'-', do the first BUILD. Otherwise do the second BUILD.
BUILD: Creates a reformatted record from the input record.
c:p,m -> e.g. 41:122,10
c: -> the output position.
p -> the starting position of the input field
m -> the length of the input field
OUTFIL: If position 290 of the reformatted record has a C'1', write the record to the output file. Otherwise, discard the reformatted record.
This seems like an overly complex way to get the result. I would think that this would be better (unless there's something more going on then you're saying):
Code:
INCLUDE COND=(147,1,CH,EQ,C'-')
OUTFIL FNAMES=OUT,
BUILD=(1:62,40,41:122,10,51:166,10,61:153,10,290:C'1')