Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to split the data in my flat file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: how to split the data in my flat file
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: 1187
Location: Bangalore,India

PostPosted: Fri Sep 15, 2006 4:21 pm    Post subject:
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: 755
Location: Germany

PostPosted: Fri Sep 15, 2006 4:28 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 5 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us