× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Packed Fromkey/Tokey Copy in CL
  • From: "Jerry Jewel" <jerryjewel@xxxxxxxxx>
  • Date: Fri, 01 Sep 2000 10:35:32 -0700

Debbie,

If I understand you correctly, the *BLDKEY keyword on your CPYF should do this 
for you, without playing with a hex value.
  
See...
http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AU302/2.1.31


The following is an excerpt from above link...

**QUOTE**
Because the key for the file is a packed decimal number, the FROMKEY and TOKEY 
values must be specified as hexadecimal strings, and the leading zeros and 
hexadecimal sign are required in the value. An alternative way of specifying 
the same key value range follows: 


     FROMKEY(*BLDKEY 8872)  TOKEY(*BLDKEY 810199) 


When *BLDKEY is specified, the copy operation converts each number to the 
format required for the file key definition. Because only a single value is 
specified, only one key field is used. The *BLDKEY form of the FROMKEY and 
TOKEY parameters allows omission of leading zeros and a positive sign value 
when the key is numeric. 
**UNQUOTE**


Hope this helps.

Regards,
Jerry Jewel

"Better living through fine code and hot coffee!"



-----Original Message-----
...
I am trying to do a fromkey/tokey file copy
inside a CL where the file key is packed.  The key needs to look
like this x'12345678901F'
...
___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.