Page 1 of 1

Eliminate Header and Trailer

PostPosted: Sun Dec 16, 2012 10:07 am
by gyt3
MY input file looks like this
hdr^123?^11asgg^
a^fsg^slsndd^gsg^fsdgs^
d^fgn^glkl^gdfngl^gdkgd^
m^fgfnd^sgndflghkldgh^sdnglfh^
trl^ngdfldkhkdglh^gfkgjdf^

I want to handle these records using Unstring function in COBOL, but i want to eliminate the records starting with "hdr" and "trl".
How is it possible ? Can anyone help me out in this?

Re: Eliminate Header and Trailer

PostPosted: Sun Dec 16, 2012 1:57 pm
by BillyBoyo
Define/REDEFINE the first three bytes of your record-area. Put a condition-name/88 on that field, specifying 'hdr' and 'trl' in the VALUE clause. Test for the condition-name and don't do the processing if true.

Re: Eliminate Header and Trailer

PostPosted: Sun Dec 16, 2012 7:15 pm
by gyt3
Thanks a lot ...