MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
Ranjish Beginner Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
Posted: Tue Apr 05, 2005 9:19 am Post subject: Converting Signed Binary to Packed decimal
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
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Apr 05, 2005 9:24 am Post subject:
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
Ranjish Beginner Joined: 22 Dec 2002 Posts: 64 Topics: 28 Location: Chennai
Posted: Tue Apr 05, 2005 9:34 am Post subject:
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
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