IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

FORMATTING the file using SORT Utility

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
Laxminarsimharao



Joined: 08 May 2007
Posts: 26
Location: hyderabad

Posted: Mon Oct 06, 2008 6:41 am    Post subject: FORMATTING the file using SORT Utility  

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  
Sambhaji



Joined: 16 Feb 2007
Posts: 260
Location: Pune, India

Posted: Mon Oct 06, 2008 10:43 am    Post subject:  

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  
Laxminarsimharao



Joined: 08 May 2007
Posts: 26
Location: hyderabad

Posted: Mon Oct 06, 2008 11:12 am    Post subject:  

Wow, I got the results correctly.

Thank you Sambhaji.
Back to top  
Sambhaji



Joined: 16 Feb 2007
Posts: 260
Location: Pune, India

Posted: Mon Oct 06, 2008 11:18 am    Post subject:  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM