[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)



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-----
From: Franck Masson [mailto:Franck.Masson@brio.com]
Sent: Wednesday, July 16, 2003 6:18 PM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] Revenge of the mainframe (aka comp3)


For a more positive aspect

visit the web site of Tony delia
http://www.sqrtools.com/funccmp3.htm


-----Original Message-----
From: the dragon [mailto:ceprn@hotmail.com]
Sent: mercredi 16 juillet 2003 22:13
To: sqr-users@sqrug.org
Subject: [sqr-users] Revenge of the mainframe (aka comp3)


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

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)

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
 

_______________________________________________
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