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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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