Page 1 of 1

Need to break a record based on positions

PostPosted: Wed Apr 04, 2012 11:33 am
by Hariprasad K
Hi...

I have a input file with LRECL 80 having 10 records and first 5 bites of each record contains different Dept Name and from 6th to 80 positon contains different
employee name ( say 6th to 15th one employee name and 16th to 25th another employee name) . now I want output file having each employee under one Dept Name.

EXP.

INPUT FILE

DEPT NAME EMP NAME
AAAAA XXXXXXXXXXXYYYYYYYYYYZZZZZZZZZZ
BBBBB PPPPPPPPPPQQQQQQQQQQRRRRRRRRRR

OUTPUT FILE
AAAAAXXXXXXXXXX
AAAAAYYYYYYYYYY
AAAAAZZZZZZZZZZ
BBBBBPPPPPPPPPP
BBBBBQQQQQQQQQ
BBBBBRRRRRRRRRR

Thanks in advance....

Re: Need to break a record based on positions

PostPosted: Wed Apr 04, 2012 11:54 am
by BillyBoyo
If you use the Code tags, spacing and alignment is preserved (a fixed font is used and spaces are respected, except for a little bug if you have one leading space).

Which Sort product do you use? Next time, take note first and post in the appropriate forum here.

Re: Need to break a record based on positions

PostPosted: Wed Apr 04, 2012 12:45 pm
by enrico-sorichetti
why post in the JCL section ?
You should have noticed that there are two sections expressly for <SORT> related questions
find out which <SORT> flavor You are running ...
( ICE... messages indicate DFSORT, WER... messages indicate SYNCSORT )
and post Your questions there
both DFSORT and SYNCSORT sections are followed by TOP experts from the relative companies
so just by asking in the right place You will get answers directly for the best!
and You will show Your good manners by not cluttering unrelated sections :geek: