HP3000-L Archives

April 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Neil Armstrong <[log in to unmask]>
Reply To:
Neil Armstrong <[log in to unmask]>
Date:
Sat, 23 Apr 2005 18:47:16 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (88 lines)
At 05:49 PM 4/23/2005, Shawn Gordon wrote:
Dear Shawn,

This is relatively easy to do, what is difficult about R4 is that some of
the data
stored can potentially cause overflows when coercing the data to the target
data type. Suprtool does it's best, but you will receive an error if an
overflow
occurs.

If you really are dead set in using zoned, the conversion would be as such:

base mydb
get r4dataset
def myzoned,1,16,display
item myzoned,dec,2 {just guessing at this}
ext somefield
ext anotherfield
ext myzoned=myr4
ext otherfield
out somefile,link
xeq

Now you may get some overflow errors if the myzoned container is not
defined large enough or the real numbers cannot be coerced to another
data type. (We sometimes choose other intermediate data types for some
coercions)

Alternatively, you can look at STExport which allows you to have control
of the appearance of data for import into other platforms or applications.

The way this works is you extract the data you want from the database into a
self-describing file using Suprtool:

base somedb
get someset
if data="thisyear"
out somefile,link
exit

Then with STExport you can then convert the data over to a typical "prn" format
however, you can exercise control over how data gets converted, an example
would be:

run stexport.pub.robelle
in somefile
col fixed   {makes fixed columns}
floating fixed   {forces all floating point numbers to be in a fixed format}
quote double
sign trailing
zero leading
out mypcfile
exit

Personally the STExport option may be the best. If you want to read more about
STExport you can check out this tutorial.

http://www.robelle.com/library/tutorials/pdfs/stexport.pdf

Hope this helps.

Neil
P.S. If you need further help Shawn, feel free to e-mail me offline.

>wow, a real topic :)
>
>We have a KSAM file that is essentially straight extracted from an image
>dataset and it has these R4 fields in it that we need to convert to Zoned
>for use on a PC application, we can do it in COBOL or Suprtool (the latter
>being preferred).  It's been so many years since I've even seen an R4 type
>that I don't remember anything about it.  Any suggestions?  thanks.
>
>
>Regards,
>
>Shawn Gordon
>President
>theKompany.com
>www.thekompany.com
>www.mindawn.com
>949-713-3276
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2