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

Can someone help me in sorting this


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

New User


Joined: 26 Feb 2006
Posts: 1

PostPosted: Tue Apr 25, 2006 8:13 pm
Reply with quote

HI,

I have an variable format input file which is to be split into two files based on first five characters of the input record.

But the problem is that the first five characters should not be present in the output file.

Example :
INPUT:

ABCDEyou are here
PQRSTis this the way to do it
.....
.....
OUTPUT :

file 1 contains
you are here

file 2 contains
is this he way to do it

Note : The first five character will either be ABCDE or PQRST
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: Tue Apr 25, 2006 9:37 pm
Reply with quote

santosh,

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

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB)
//OUT1 DD DSN=...    output file1 (VB)
//OUT2 DD DSN=...    output file2 (VB)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,INCLUDE=(5,5,CH,EQ,C'ABCDE'),
    OUTREC=(1,4,10)
  OUTFIL FNAMES=OUT2,INCLUDE=(5,5,CH,EQ,C'PQRST'),
    OUTREC=(1,4,10)
/*
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
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Sorting a record spanned over multipl... DFSORT/ICETOOL 13
No new posts Creating additional seqnum/Literal wh... DFSORT/ICETOOL 4
No new posts ICETOOL Sorting and Discarding DUPS SYNCSORT 11
No new posts Sorting on text - but in non-alphabet... SYNCSORT 5
Search our Forums:

Back to Top