[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Revenge of the mainframe (aka comp3)
You might want to find the wisest Mainframe guru at the client site. He
can probably tell you how the decimals are packed and how to unpack them-
any MF Guru worth his salt has hex edited a file at some point to massage a
bit of data that has been giving them problems, and can probably pack a
decimal by hand. Then, you can probably create a string version of the
packed number. (It seems like some packed numbers are site-specific.)
I don't have the destroying and creating matter option.... yet. I've heard
it's quite handy; I can't wait for the upgrade. :-)
Allen
"the dragon"
<ceprn@hotmail.c To: sqr-users@sqrug.org
om> cc:
Sent by: Subject: RE: [sqr-users]
Revenge of the mainframe (aka comp3)
sqr-users-admin@
sqrug.org
07/17/2003 10:50
AM
Please respond
to sqr-users
Kathy,
Thanks. That is actually plan B for right now - that I create the output
as
normal numbers (ASCII) and then a small cobol program is run between the
output and the other cobol program to take the numbers and squash then into
mainframese.
The reason that is plan B is that I have always opined that SQR could do
*anything* up to and including destroying and creating matter, so if there
is a way to accomplish what I want without relying on archaic languages, I
would like to find it.
clark 'the dragon' willis
dragon enterprises, consulting services
PSA: Salary <> Slavery. If you earn a salary, your employer is renting
your
services for 40 hours a week, not purchasing your soul. Your time is the
only real finite asset that you have, and once used it can never be
recovered, so don't waste it by giving it away.
"Time is the coin of your life. It is the only coin you have, and only you
can determine how it will be spent. Be careful lest you let other people
spend it for you."
Carl Sandburg
(1878 - 1967)
----Original Message Follows----
Hi:
One way would be to make those output fields of your sqr as
number
(of course) and then add a litle something to the cobol program like so:
This is the output file of your sqr program and would be described in
the File Section of your cobol program as an input file.
01 file-from-sqr.
05 num1-field-from-sqr pic 99999.
05 num2-field-from-sqr pic 99999.
etc.
This would be in the working storage section.
01 filler.
05 numberfield1 pic s9(5) comp-3.
05 numberfield2 pic s9(5) comp-3.
etc.
Then right in the beginning of the Procedure Division, right after you
read a record in, do this:
move num1-field-from-sqr to numberfield1
move num2-field-from-sqr to numberfield2
etcetera for each additional field.
What the Cobol program will do during the move statements is to convert the
field to the correct format, either packed (comp-3) or binary (comp).
If you are not allowed to change the Cobol program that is reading in the
output of your sqr, then maybe with some help you could write a tiny Cobol
program that does the converts and then use the output of that as the input
to the other program.
Of course maybe you'll get some answers on how to do this all in SQR.
Kathy
-----Original Message-----
For a more positive aspect
visit the web site of Tony delia
http://www.sqrtools.com/funccmp3.htm
-----Original Message-----
Hi all,
I have an unusual (well, for me anyway) task to perform at the client I am
at. We are running Financials v8.x with the database being udb (v7.2?) on
a
mainframe (OS/390). I am creating an sqr which will read an ascii file,
perform some validation and data massaging and then creating an output file
to be used as input for a cobol program. The challenge - some of the
fields
are *number* and defined in the copy book as comp and comp-3, which I
understand to be packed decimal. How do I go about creating these
mysterious little beasties?
I read through the archive list and the best I could come up with is "sqr
doesn't do this, build comething in another langauge and call it" from
2000.
I was wondering if anyone has anything newer to add about this issue
that
might be of a more positive aspect?
thanks in advance
clark 'the dragon' willis
dragon enterprises, consulting services
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users