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

BI,TO=ZD Changing Values


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

New User


Joined: 17 Jul 2017
Posts: 4
Location: NW Arkansas

PostPosted: Tue Jul 25, 2017 12:12 am
Reply with quote

First time poster here, long time stalker.

Ive got a unsigned comp field (FIELD3) that Im converting to ZD but it is changing the value on the output file and I cant figure out why. Ive ran it both as a FI & BI input and same result. What am I missing here? Ive got several other columns where Im doing a similar conversion and not seeing this occurrence. Thanks in advance.

Input below.
FIELD1,1,2,CH
FIELD2,3,2,CH
FIELD3,5,4,BI
FIELD4,9,4,BI
etc...

BUILD=(FIELD1,
FIELD2,
FIELD3,TO=ZD,LENGTH=9,
FIELD4,TO=ZD,LENGTH=9,
ETC...


The decimal value of X'008D4A61' is 9259617.

OUTFIL FNAMES=F1,INCLUDE=(138,2,FI,EQ,2,AND,136,2,FI,EQ,1),BUILD=(*
1,2,3,2,5,4,FI,TO=ZD,LENGTH=9,141,2,FI,TO=ZD,LENGTH=3,9,*


Code:

----+----1----+----2-
*********************
US01 ý¢/   aDC   €ST2
EEFF08460018CC0019EEF
42010DA1007143009F232
*********************



Output is changed to 9259616

Code:

----+----1----+-
****************
US01009259616092
****************
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 25, 2017 12:49 am
Reply with quote

I just ran a BUILD=(1,4,FI,TO=ZD,LENGTH=9) on the value X'008D4A61' in DFSORT and got the output of 009259617, so most likely something in the code you did not post is overlaying the last digit. Try running only that one conversion and see what value is output.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Thu Jul 27, 2017 1:48 am
Reply with quote

Tyler Dunbar wrote:
First time poster here, long time stalker.

In your example the input record must have the length 12, while output to be 22 bytes long.
The data shown have length 21, and 16 bytes instead.
Please verify all your fields offset/size, and clarify this issue.

BTW, "BI,4" stands for signed binary, not for unsigned comp
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Thu Jul 27, 2017 1:56 am
Reply with quote

sergeyken wrote:

BTW, "BI,4" stands for signed binary, not for unsigned comp


As per dfsort programming guide

Format code BI is Unsigned binary.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Thu Jul 27, 2017 2:09 am
Reply with quote

magesh23586 wrote:
sergeyken wrote:

BTW, "BI,4" stands for signed binary, not for unsigned comp


As per dfsort programming guide

Format code BI is Unsigned binary.

I'm sorry, you're right. I messed those BI/FI abbreviations.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
Search our Forums:

Back to Top