Need to break a record based on positions



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Need to break a record based on positions

Postby Hariprasad K » Wed Apr 04, 2012 11:33 am

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....
Hariprasad K
 
Posts: 19
Joined: Sat Feb 25, 2012 5:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need to break a record based on positions

 

Re: Need to break a record based on positions

Postby BillyBoyo » Wed Apr 04, 2012 11:54 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Need to break a record based on positions

Postby enrico-sorichetti » Wed Apr 04, 2012 12:45 pm

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:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post