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

what will be length of formatted variable?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 05, 2008 2:50 pm
Reply with quote

Hi All,

I have a requirement wherein i am changing the BI to ZD. I want to know the relation between the length of input BI and the length of output ZD.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon May 05, 2008 2:52 pm
Reply with quote

Hello Tushar,

Would you kindly give us sample i/p & output?
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 05, 2008 2:57 pm
Reply with quote

Hi Ekta,

In one of the document, i read that if you have 4 byte BI, that changes to 10 byte ZD. And nowhere the exact relation betwenn the two length was mentioned.
my rquirement is to change the S9(09) Comp to ZD.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon May 05, 2008 8:35 pm
Reply with quote

Hi Tushar,

What I usually do is use the Windows calculator, set it toHex and enter FF for each binary byte you expect in the I/P. Then set to Dec and count the decimal digits.

Eg., for 2 binary bytes enter FFFF; the decimal result is 65535 (5 digits).
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 05, 2008 9:03 pm
Reply with quote

Thank's Jack. It was really helpful.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 05, 2008 9:15 pm
Reply with quote

Hi Jack,

I have a silly question -
a packed decimal is named because of the way the number is stored in the memory. Similarly it goes for binary.

But why the ZD has been named as zoned decimal. Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 05, 2008 9:27 pm
Reply with quote

Quote:
In one of the document, i read that if you have 4 byte BI, that changes to 10 byte ZD. And nowhere the exact relation betwenn the two length was mentioned.


Tushar,

Which sort product are you using (DFSORT = ICE messages or Syncsort = WER messages)?
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Mon May 05, 2008 9:29 pm
Reply with quote

Hi Frank,

I am using ICETOOL.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 05, 2008 9:30 pm
Reply with quote

Quote:
But why the ZD has been named as zoned decimal. Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone.


A ZD value is stored internally like this:

zdzd...sd

By definition, the first nibble (z) of every byte but the last is called a "zone". The first nibble (s) of the last byte is the sign. d is a digit (0-9).
If you want to delve deeper than that, try a google search.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Mon May 05, 2008 10:34 pm
Reply with quote

Hi,

Zonal/Zoned decimal is a format to use with EBCDIC input and output permitting a sign overpunch in the low order position of the field.

e.g.: + 1234 would be represented as: 1111/0001/1111/0010/1111/0011/1100/0100.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 05, 2008 10:46 pm
Reply with quote

Quote:
I am using ICETOOL.


That doesn't tell me which product you're using. You could be using DFSORT's ICETOOL or you could be using Syncsort's SYNCTOOL. PGM=ICETOOL will invoke the one you're using.

Look at the //TOOLMSG output and tell me whether you see ICExxxs messages (e.g. ICE600I) or SYTxxxs messages.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue May 06, 2008 7:36 am
Reply with quote

Hello Tushar,

Quote:
Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone.


Once upon a time most data that was processed began life on "punched cards". These cards were 12x80. Ten of the positions were for zero thru nine (0-9). The other 2 were for the "zone punches" - "12-zone" (positive) and the "11-zone" (negative). These 2 were the top 2 on a card. The "sign" for a numeric field was "punched over" the least significant digit (the same way the sign is the high-order nibble of the low-order byte of a zoned-decimal number).

Incidentally, that same 80-column card is why the standard terminal is 80 characters wide. . .
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue May 06, 2008 8:50 pm
Reply with quote

and why most (if not all) of the utilities use 80 byte sysin data.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts CA7 count with DATE variable CA Products 0
No new posts Get RECORD LENGTH, allocated space of... CLIST & REXX 7
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top