Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
BI,TO=ZD Changing Values

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Tyler Dunbar

New User


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

PostPosted: Tue Jul 25, 2017 12:12 am    Post subject: BI,TO=ZD Changing Values
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: 8201
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 25, 2017 12:49 am    Post subject: Reply to: BI,TO=ZD Changing Values
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

Active User


Joined: 29 Apr 2008
Posts: 233
Location: Maryland

PostPosted: Thu Jul 27, 2017 1:48 am    Post subject: Re: BI,TO=ZD Changing Values
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: 211
Location: Chennai

PostPosted: Thu Jul 27, 2017 1:56 am    Post subject: Reply to: BI,TO=ZD Changing Values
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

Active User


Joined: 29 Apr 2008
Posts: 233
Location: Maryland

PostPosted: Thu Jul 27, 2017 2:09 am    Post subject: Re: Reply to: BI,TO=ZD Changing Values
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us