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 a file vertically using ICETOOL/DFSORT ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Rajan Moorthy
Warnings : 1

New User


Joined: 04 Jun 2007
Posts: 6
Location: Chennai

PostPosted: Wed Sep 26, 2007 5:21 pm    Post subject: How to Split a file vertically using ICETOOL/DFSORT ?
Reply with quote

My requirement is, how to split a file in to two files vertically based on the column. For Example,

INFILE1.(Rec length is 80)

Code:

CITY NAME IS NEWYORK        COUNTRY IS UNITED STATES
CITY NAME IS PARIS          COUNTRY IS FRANCE
CITY NAME IS MUMBAI         COUNTRY IS INDIA


OUTFILE1:

Code:

CITY NAME IS NEWYORK
CITY NAME IS PARIS
CITY NAME IS MUMBAI


OUTFILE2:

Code:

COUNTRY IS UNITED STATES
COUNTRY IS FRANCE
COUNTRY IS INDIA


Thanks,
Rajan Moorthy
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Sep 26, 2007 8:57 pm    Post subject:
Reply with quote

Rajan,

Here's a DFSORT job that will do what you asked for. I assumed the characters you want in output file1 start in input position 1 and the characters you want in output file2 start in input position 29, but the job can be changed appropriately for other layouts.

Code:

//S1    EXEC  PGM=ICEMAN                                     
//SYSOUT    DD  SYSOUT=*                                     
//SORTIN DD *                                                 
CITY NAME IS NEWYORK        COUNTRY IS UNITED STATES         
CITY NAME IS PARIS          COUNTRY IS FRANCE                 
CITY NAME IS MUMBAI         COUNTRY IS INDIA                 
/*
//OUT1 DD SYSOUT=*                                           
//OUT2 DD SYSOUT=*                                           
//SYSIN    DD    *                                           
  OPTION COPY                                                 
  OUTFIL FNAMES=OUT1,BUILD=(1,28,80:X)                       
  OUTFIL FNAMES=OUT2,BUILD=(29,28,80:X)                       
/*
Back to top
View user's profile Send private message
Rajan Moorthy
Warnings : 1

New User


Joined: 04 Jun 2007
Posts: 6
Location: Chennai

PostPosted: Fri Sep 28, 2007 6:04 pm    Post subject: Reply to: How to Split a file vertically using ICETOOL/DFSOR
Reply with quote

Thanks Frank, Its working
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 11 Tue May 16, 2017 2:20 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 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