View previous topic :: View next topic
|
Author |
Message |
abhicet2003
New User
Joined: 16 Nov 2005 Posts: 21
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
abhicet2003
New User
Joined: 16 Nov 2005 Posts: 21
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|