MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tsq maximum number of items
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Fri Mar 13, 2009 6:18 pm    Post subject: Reply with quote

i wonder WHY the picture of a half-word field is s9(04) instead of s9(05).

if i can store up to 32767 in a 2 byte binary field, its cobol picture should be 9(05).

why it isn't?
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Fri Mar 13, 2009 8:34 pm    Post subject: Reply with quote

jctgf wrote:
i wonder WHY the picture of a half-word field is s9(04) instead of s9(05).

if i can store up to 32767 in a 2 byte binary field, its cobol picture should be 9(05).

why it isn't?

Because it would require the COBOL compiler to use clairvoyance to determine if a programmer meant for a field with PIC 9(05) to be cast as a 2-byte binary field intended to hold a maximum value of 32,767, OR meant for it to be cast as a 4-byte binary field intended to hold a maximum value of 99,999. Since the compiler is NOT clairvoyant, it requires that the programmer indicate his/her intent to exceed the number of digits in the PICTURE clause ( up to the max value supported ) by explicitly indicating that intent by either specifying COMP-5 or TRUNC(BIN).
Back to top
View user's profile Send private message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sat Mar 14, 2009 8:51 am    Post subject: Reply with quote

I
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Sat Mar 14, 2009 10:48 pm    Post subject: Reply with quote

jctgf wrote:
I
Back to top
View user's profile Send private message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sun Mar 15, 2009 9:20 am    Post subject: Reply with quote

Hi there,

I wish I knew Assembler. It
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Sun Mar 15, 2009 11:08 am    Post subject: Reply with quote

jctgf wrote:
Hi there,

I wish I knew Assembler. It
_________________
A computer once beat me at chess, but it was no match for me at kick boxing.
Back to top
View user's profile Send private message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sun Mar 15, 2009 4:14 pm    Post subject: Reply with quote

Quote:
I'd wager that you specified a PIC 9(05) rather than 9(04). 9(04) COMP-5 would not generate a full-word binary field.


i specified a pic s9(05) comp-5.

should i have specified s9(04) comp-5?

i'd like to move 15,123 (for example) to it.

thanks.
Back to top
View user's profile Send private message Send e-mail
RonB
Beginner


Joined: 02 Dec 2002
Posts: 93
Topics: 0
Location: Orlando, FL

PostPosted: Sun Mar 15, 2009 5:03 pm    Post subject: Reply with quote

jctgf wrote:
Quote:
I'd wager that you specified a PIC 9(05) rather than 9(04). 9(04) COMP-5 would not generate a full-word binary field.


i specified a pic s9(05) comp-5.

should i have specified s9(04) comp-5?

i'd like to move 15,123 (for example) to it.

thanks.

Yes, you should have coded PIC S9(04) COMP-5. The PIC S9(04) part causes the compiler to allocate only a halfword to the field, and the COMP-5 usage essentially tells the compiler to ignore the fact that the PICTURE specified only 4-digits, and permit you to specify or store values up to the maximum value that a binary halfword will hold, namely 32,767.
Back to top
View user's profile Send private message
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Wed Mar 18, 2009 5:49 pm    Post subject: Reply with quote

hi,
i tested the pic 9(04) comp-5 and it worked wonderfully.
thanks a lot.
Back to top
View user's profile Send private message Send e-mail
jctgf
Beginner


Joined: 05 Nov 2006
Posts: 89
Topics: 36

PostPosted: Sun Mar 29, 2009 10:00 am    Post subject: Reply with quote

RonB wrote:
While you don't necessarily need to know how to code Assembler, it would be good to study the Principles of Operation manual, which contains a great deal of information besides just the instruction set.


Hi RonB,
Could you please inform in which manual specifically can I find the "Principles of Operation" section?
Thanks.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Sun Mar 29, 2009 2:07 pm    Post subject: Reply with quote

jctgf wrote:
Hi RonB,
Could you please inform in which manual specifically can I find the "Principles of Operation" section?
Thanks.


Jctgf,

z/Architecture Principles of Operation is a book by itself and is just not a section. Here is the Latest edition of the manual in PDF format.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/DZ9ZR007.pdf?

You can also get the older editions in Book Manager format here

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=SA22-7832&SUBMIT=Find

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Sun Mar 29, 2009 2:09 pm    Post subject: Reply with quote

Principles of Operation IS a manual. The one I have is SA22-7832-03
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group