MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unpacking 9 byte packed decmial

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Mukunda
Beginner


Joined: 11 Dec 2002
Posts: 46
Topics: 15

PostPosted: Thu Jun 02, 2005 7:51 am    Post subject: Unpacking 9 byte packed decmial Reply with quote

Gurus
Is there a way to unpack 9 byte packed decimal? Rolling Eyes We have syncsort, file-aid and SAS at our shop.
I understand that syncsort has a limitation of 8 bytes. I searched the help boards and could not get much help on these lines. I'm trying to unpack a 9 byte packed decimal...
Code:
SYSIN :                                                           
    INREC FIELDS=(1,3,PD,EDIT(TTTTTT),                             
                  269,9,PD,EDIT=(STTTTTTTTTTTTT.TTTT),SIGNS=(,-)) 
                      *                                           
    SORT FIELDS=COPY                                               
WER161B  ALTERNATE PARM USED                                       
WER271A  INREC STATEMENT   : NUMERIC FIELD ERROR                   

Thank you!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 02, 2005 8:44 am    Post subject: Reply with quote

Mukunda,

Syncsort does not support more than 8 bytes on outrec fields. Since packed decimal fields store the sign the last byte , we can split the field into 2 fields and then re-arrange the fields using outrec

Try this

Code:

//SYSIN    DD *
 INREC FIELDS=(1,3,PD,EDIT(TTTTTT),                             
               269,1,PD,EDIT=(TT),                             
               270,8,PD,EDIT=(STTTTTTTTTTT.TTTT),SIGNS=(,-))   
 OUTREC FIELDS=(1,6,                                           
                9,1,                                           
                7,2,                                           
               10,16)                                           
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Jun 02, 2005 9:33 am    Post subject: Reply with quote

For the record, note that the following works fine with DFSORT:

Code:

    INREC FIELDS=(1,3,PD,EDIT=(TTTTTT),                             
                  269,9,PD,EDIT=(STTTTTTTTTTTTT.TTTT),SIGNS=(,-))   
    SORT FIELDS=COPY                                                 

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mukunda
Beginner


Joined: 11 Dec 2002
Posts: 46
Topics: 15

PostPosted: Thu Jun 02, 2005 4:12 pm    Post subject: Reply with quote

Thanks a lot, Kolusu. It works fine Very Happy
Back to top
View user's profile Send private message
mainhead
Beginner


Joined: 07 Feb 2006
Posts: 26
Topics: 11

PostPosted: Sun Jul 02, 2006 10:30 am    Post subject: Reply with quote

Hello ,

Could you please let me know why you have given

EDIT=(STTTTTTTTTTT.TTTT) what is the Purpose.

Thanks ,
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Jul 02, 2006 1:55 pm    Post subject: Reply with quote

mainhead,

Check this link which explains about the edit masks

Edit Mask Patterns

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group