IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to split the data in my flat file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kiran_polnati
Warnings : 2

New User


Joined: 23 Jun 2005
Posts: 22

PostPosted: Fri Sep 15, 2006 4:15 pm
Reply with quote

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
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Sep 15, 2006 4:21 pm
Reply with quote

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)
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Sep 15, 2006 4:28 pm
Reply with quote

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
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top