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

FORMATTING the file using SORT Utility


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

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Mon Oct 06, 2008 6:41 am
Reply with quote

I have following problem,
I need to format the input file using SORT utility.

Input File
123*raju*raju.annam@rediff.com*099*100*001
123*raju***100*001
12355555*rajurrrrrrrrr*raju.annamaaaaaaaaa@rediff.com*099**001
12355*****

Output File
Layout should be
NUM PIC X(10)
NAME PIC X(30)
EMAIL PIC X(50)
Marks1 PIX X(3)
Marks2 PIX X(3)
Marks3 PIX X(3)


Output file should be formatted, * is the delimiter in the input file.

And I do not want ‘*’ in the output file.

Please help me out.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 06, 2008 10:43 am
Reply with quote

Here is the icetool job
Code:

//S2    EXEC  PGM=ICETOOL 
//TOOLMSG DD SYSOUT=*     
//DFSMSG  DD  SYSOUT=*     
//OUTFILE1 DD SYSOUT=*                                       
//INPUTF1 DD *                                               
123*RAJU*RAJU.ANNAM@REDIFF.COM*099*100*001                   
123*RAJU***100*001                                           
12355555*RAJURRRRRRRRR*RAJU.ANNAMAAAAAAAAA@REDIFF.COM*099**001
12355*****                                                   
/*                                                           
//TOOLIN DD *                                                 
COPY FROM(INPUTF1) TO(OUTFILE1) USING(CTL1)                 
/*                                                           
//CTL1CNTL DD *                                               
  INREC  PARSE=(%00=(FIXLEN=10,ENDBEFR=C'*'),                 
               %01=(FIXLEN=30,ENDBEFR=C'*'),                 
               %02=(FIXLEN=50,ENDBEFR=C'*'),                 
               %03=(FIXLEN=3,ENDBEFR=C'*'),                   
               %04=(FIXLEN=3,ENDBEFR=C'*'),                   
               %05=(FIXLEN=3,ENDBEFR=C'*')),
         BUILD=(%00,%01,%02,%03,%04,%05)   
/*                                         
Back to top
View user's profile Send private message
Laxminarsimharao

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Mon Oct 06, 2008 11:12 am
Reply with quote

Wow, I got the results correctly.

Thank you Sambhaji.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 06, 2008 11:18 am
Reply with quote

Quote:

Wow, I got the results correctly.

Thank you Sambhaji.


You are welcome.
See Documents and Manuals at below link. They will help you more than anybody..

www.ibm.com/systems/support/storage/software/sort/mvs/srtmpub.html
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top