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

Format conversion using DFSORT


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

New User


Joined: 06 Jul 2009
Posts: 13
Location: chennai

PostPosted: Tue Aug 24, 2010 5:44 pm
Reply with quote

Hi,
I tried to use SORT utility with EDIT option to convert 00002.99 to 0000000299.But i got the output as

"0000000029"

my sort step was

Code:
//STEP2    EXEC PGM=SORT                           
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                     
 00002.99                                           
/*                                                 
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                     
  SORT FIELDS=COPY                                 
  OUTREC FIELDS=(1:1,8,ZD,EDIT=(TTTTTTTTTT))   
/*   


can anyone please help me obtaining the correct output!!

Regards,
Muthu.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 24, 2010 6:03 pm
Reply with quote

Looks to me like your number starts in position 2 not in 1.
Back to top
View user's profile Send private message
kumarmca1

New User


Joined: 06 Jul 2009
Posts: 13
Location: chennai

PostPosted: Tue Aug 24, 2010 6:31 pm
Reply with quote

I am getting the below error when i tried to start the number from position 1.

Code:
ICE751I 2 EF-K10929 F0-Q84357 DA-K26318                                         
ICE185A 0 AN S0C7  ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT (PHASE C 3)


Please help to sort out this error.

Thanks,
Muthu
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 24, 2010 6:56 pm
Reply with quote

kumarmca1 wrote:
I am getting the below error when i tried to start the number from position 1.

Code:
ICE751I 2 EF-K10929 F0-Q84357 DA-K26318                                         
ICE185A 0 AN S0C7  ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT (PHASE C 3)


Please help to sort out this error.

Thanks,
Muthu


00002.99 is not a zoned decimal.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Aug 24, 2010 7:00 pm
Reply with quote

00002.99 is not zoned decimal. I'd suggest you check out use of SFF and UFF formats.

Garry.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue Aug 24, 2010 7:22 pm
Reply with quote

kumarmca1,

Use below...
Code:
//SORT01   EXEC PGM=SORT                       
//SORTIN   DD  *                               
00002.99                                       
//SORTOUT  DD  SYSOUT=*                       
//SYSIN    DD  *                               
  SORT FIELDS=COPY                             
  OUTREC FIELDS=(1:1,8,UFF,EDIT=(TTTTTTTTTT)) 
//SYSOUT   DD  SYSOUT=*                       
//SYSPRINT DD  SYSOUT=*                       
//SYSUDUMP DD  SYSOUT=D                       


OUTPUT
Code:
0000000299


Thanks,
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts 10 byte RBA conversion DB2 2
Search our Forums:

Back to Top