kiran_polnati Warnings : 2 New User
Joined: 23 Jun 2005 Posts: 22
|
|
|
|
hi ,
i have a flat file that contains data . i want to split that data in another file that contains only 1-40 charecter length. how can i code? is there any jcl to do this task ? or we have to code this in cobol program?
file contains:asjdfkjsafsafsafsafsass so ....... on
but i need 1-40 charecter length. Split that flat file .
Advanced thanks to all.
regards,
raghu |
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi raghu,
If u want to have the o/p file taht should contain only initial 40 bytes then u can use this:
Code: |
OPTION COPY
OUTFIL OUTREC=(1:1,40)
|
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Use the OUTREC statement. Copy or Sort your File as Sortin to a new File as Sortout and specify the Bytes you want to be transfered fom input to output in any order. Take a look at Sort-Manual. For example:
Code: |
OUTREC=(53,01,47,06,01,03,X,11,26,X,29993,08,X,37,10,X)
|
Output position 1 = input position 53
Output position 2-7 = input positions 47-51
and so on.
X -> blank
Regards, UmeySan |
|