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
 

 

FORMATTING the file using SORT Utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: FORMATTING the file using SORT Utility
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    Post subject:
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    Post subject:
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    Post subject:
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..

http://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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


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