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
 

 

Splitting a single record in to two lines using sort.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Splitting a single record in to two lines using sort.
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: 1439
Location: Bangalore,India

PostPosted: Mon Apr 02, 2007 9:29 am    Post subject:
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    Post subject: Re: Splitting a single record in to two lines using sort.
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 Moderator


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

PostPosted: Mon Apr 02, 2007 8:26 pm    Post subject:
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    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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 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
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm


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