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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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