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 

Converting Signed Binary to Packed decimal

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


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Tue Apr 05, 2005 9:19 am    Post subject: Converting Signed Binary to Packed decimal Reply with quote

Hi,

Can any one pls provide the sort jcl for converting Signed binary value to Packed decimal? or (e-g)
Code:

//SYSIN    DD  *                 
  SORT FIELDS=COPY               
  OUTREC FIELDS=(1,144,           
          145,4,BI,PD,LENGTH=5,   
          149,4,BI,PD,LENGTH=5,   
          153,4,BI,PD,LENGTH=5,   
          157,4,BI,PD,LENGTH=5,   
              161,28)             
/*                               


The above stmt's executes fine for unsigned binary and giving the correct result...But for signed binary, it gives unpredictablevalue in the output.Pls advice...
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: Tue Apr 05, 2005 9:24 am    Post subject: Reply with quote

Ranjish,

Use FI instead of BI. FI is a fixed point binary which is a signed field.
Code:

//SYSIN    DD  *                 
  SORT FIELDS=COPY               
  OUTREC FIELDS=(1,144,           
          145,4,FI,PD,LENGTH=5,   
          149,4,FI,PD,LENGTH=5,   
          153,4,FI,PD,LENGTH=5,   
          157,4,FI,PD,LENGTH=5,   
              161,28)             
/*                               


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
Ranjish
Beginner


Joined: 22 Dec 2002
Posts: 64
Topics: 28
Location: Chennai

PostPosted: Tue Apr 05, 2005 9:34 am    Post subject: Reply with quote

Hi Kolusu,

Thanks a lot for your speedy reply....I tested it and it's working fine....Thanks again for your help...
Back to top
View user's profile Send private message
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