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 

How to move high-values in CSP or Visual Age?
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Jul 19, 2010 3:21 pm    Post subject: Reply with quote

prog_mario,

i am afraid you are going to have to look at the manual and determine the syntax for defining 5 bytes of hexidecimal FF.

you could try defining a working storage field as 5 bytes char with a value clause for a hex 'FFFFFFFFFF'. then you could use the working storage field in your code instead of the literal.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Jul 19, 2010 3:23 pm    Post subject: Reply with quote

As an experiment, redefine the variable as a 5-byte binary number and move 1099511627775 to that variable (or use 5 1-byte binary numbers and move 255 to each of the 5.

After the move(s) the char(5) field will contain F's. . .
_________________
All the best,

di
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Jul 19, 2010 3:47 pm    Post subject: Reply with quote

last guess:

you use ' ' for a literal and also " " for a literal.

try x"FFFFFFFFFF" and "FFFFFFFFFF"X

papadi
can you define a 1 byte binary field in VisualAge Cobol.
you can't in COBOL II or E-COBOL, both of which are IBM.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Jul 19, 2010 3:59 pm    Post subject: Reply with quote

Good catch Smile

About Visual Age - don't know. . .

With Enterprise COBOL, the low-order byte of a 2-byte comp field works well 8)
_________________
All the best,

di
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Jul 19, 2010 4:38 pm    Post subject: Reply with quote

yes, the right hand side of a two byte binary field would contain X'FF' if you VALUE 255 for the the two byte binary field.
then move the right hand byte to each of the 5 bytes of the PIC x(5) field.

also, can you define 5 bytes of binary? I thought only 2, 4 and 8.
and wouldn't 1099511627775 require PIC S9(13) COMP, thus 8 bytes. I guess you could redefine the last 5 as PIC X,

but it would be somuch easier to figure out how to define a hex literal.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Jul 19, 2010 5:17 pm    Post subject: Reply with quote

Quote:
but it would be somuch easier to figure out how to define a hex literal.
Yup, it surely should, but that appeared to be non-trivial from the dialog, so. . . Wink
_________________
All the best,

di
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Jul 19, 2010 5:59 pm    Post subject: Reply with quote

Quote:
...non-trivial...


yes,
much easier to ask the question on a website
than look at documentation.

but in all fairness to the TS,
his native tongue is Portugese
and all documentation is probably english or spanish.

I know that I have a hard time going through german text books,
not always knowing the german equivalent of an english keyword.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
prog_mario
Beginner


Joined: 08 Sep 2007
Posts: 86
Topics: 27

PostPosted: Thu Jul 22, 2010 10:58 am    Post subject: Reply with quote

Thanks a lot everybody. I just changed the logic to avoid the high-values.
_________________
The more I learn, the more I want to learn.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Thu Jul 22, 2010 3:59 pm    Post subject: Reply with quote

Well, sometimes the work just needs to get done 8)

I would recommend that you pursue how to do what you originally wanted - there may be a time it (or something similar) actually must be done.
_________________
All the best,

di
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 -> Application Programming 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