Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

what will be length of formatted variable?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: what will be length of formatted variable?
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: 1187
Location: Bangalore,India

PostPosted: Mon May 05, 2008 2:52 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon May 05, 2008 9:27 pm    Post subject:
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    Post subject:
Reply with quote

Hi Frank,

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

DFSORT Moderator


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

PostPosted: Mon May 05, 2008 9:30 pm    Post subject:
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

Senior Member


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

PostPosted: Mon May 05, 2008 10:34 pm    Post subject:
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 Moderator


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

PostPosted: Mon May 05, 2008 10:46 pm    Post subject:
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

Site Director


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

PostPosted: Tue May 06, 2008 7:36 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us