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: 7
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: 7
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
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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