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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


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