IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Splitting a single record in to two lines using sort.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhicet2003

New User


Joined: 16 Nov 2005
Posts: 21

PostPosted: Mon Apr 02, 2007 8:04 am
Reply with quote

Hi Can any one please tell me the syntax for splitting a single record in to two lines using sort.

For eg:
If Input file contains

IBM MAINFRAME SORT

Then output should be

IBM MAINFRAME
IBM SORT
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Apr 02, 2007 9:29 am
Reply with quote

Yes it can be done through sort techniques (using seqnum option).

What is the criteria for splitting records? Need more explanation along with examples.
Back to top
View user's profile Send private message
abhicet2003

New User


Joined: 16 Nov 2005
Posts: 21

PostPosted: Mon Apr 02, 2007 1:30 pm
Reply with quote

Please see the example below

Input file contains only 1 record ie
From Col 1 to Col 3 - IBM
From Col 4 to Col 12-MAINFRAME
From Col 13 to Col 16-SORT


Desired Output is
In the first line
From Col 1 to Col 12-IBMMAINFRAME
In the Second line
From Col 1 to Col 7-IBMSORT
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Apr 02, 2007 8:26 pm
Reply with quote

abhicet2003,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
IBMMAINFRAMESORT
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL BUILD=(1,12,/,1,3,13,4)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top