IDMS

  • 1.  USING OLQBATCH

    Posted Oct 17, 2011 02:23 AM
    HI,
    I am using OLQBATCH to extract a record from databse.
    In the Query i have written

    Select column-name From record-name Where condition Output out-file-name.

    In this column name has picture clause of S9(0012)V9(4) COMP-3 so i am unable to see it in normal form. In the out-file-name the hexadecimal format is shown.

    is there any way of displaying these kind of values in the select query.

    Thanks in advance.


  • 2.  RE: USING OLQBATCH

    Posted Oct 16, 2011 10:44 PM

    Have you tried looking at "CA IDMS OLQ Online Query Reference Guide" ? Section 11 Batch Processing has the little gem in "11.2.1 Defining files":

    Defining output files:
    The output file is the file the report data is written to. You use the DEFINE FILE statement to direct the output to a file:
    DEFINE FILE OUTFILE OUTPUT
    This command marks the file OUTFILE as containing the report output. The data set is written out in its unformatted condition to the output file. If you want to use the output file as an input file, you must do so in a subsequent job step.
    <<<<<<<<< snip >>>>>>>>>>>

    Having said that - there may be other things worth a try - in particular the EDIT command?

    HTH - cheers - Gary


    6.15 EDIT
    EDIT edits a field for display. To edit a computed field for display, see EDIT
    COMPUTATION.
    Syntax:


    ─── EDIt ─┬─────────────────────────────────────┬───────────────────────────

    ├─┬────────────┬─ record-name. ───────┤
    │ └─ view-id. ─┘ │
    └─ logical-record-name.element-name. ─┘

    ─── field-name ─┬─────────────────────────┬─────────────────────────────────

    │ ┌───── , ─────┐ │
    └─ ( -↓- subscript ─┴─ ) ─┘

    ─┬───────────────────────────┬──────────────────────────────────────────────

    └─ VIEw ─┬─────┬─ view-id. ─┘
    └─ = ─┘
    <<<<<<<<<<<<<<<<< snip >>>>>>>>>>>>>>>>>>>>>>>>>>



  • 3.  RE: USING OLQBATCH

    Posted Oct 17, 2011 03:32 AM
    HI,
    I went through the OLQ reference guide.
    I already get my output in the output file but the problem is EDIT command doesnt work with OLQBACTH it gives user abend. Kindly help me out in how to format the output which i get from OLQBATCH step.


  • 4.  RE: USING OLQBATCH

    Posted Oct 17, 2011 04:12 AM
    I'd suggest it's time to "switch horses". Obviously you can't do exactly what you want with OLQBATCH - so you have choices but first you need to accept that what you are getting is what you will get as output from your Select - then:
    1) Use DEFINE FILE to use OLQ against a flat file, or
    2) Use Cobol, Culprit, or other utility to view the output file in the desired format, or
    3) Use Culprit (for example) instead of OLQBATCH, or
    4) Use your imagination and try something else!
    :cold:
    HTH - cheers - Gary


  • 5.  RE: USING OLQBATCH
    Best Answer

    Posted Oct 17, 2011 06:12 AM
    You are trying to do something that the product is not designed for, so I agree with Gary, it may be time to rethink the strategy.

    However, what you want to do, can be done.

    Just apply a function to the column, one that returns the result in a displayable format, that is easy with integers, but for decimals it becomes a bit more complicated.
    integercolumn is defined as pic s9(7) comp-3
    decimalcolumn is defined as pic 9.9999 comp-3

    You will have to figure out what the length of the resulting column is to correctly do the substr().

    SELECT CONCAT(' ' NEXIH(intergercolumn) ' ' -
    NEXIL(decimalcolumn) '.' -
    TRANSLATE( -
    SUBSTR( -
    decimalcolumn * 10000 - NEXIL(decimalcolumn) * 10000,13,4) -
    ,0,' ') -
    ) -
    FROM record -
    OUTPUT OUTFILE;

    The result should look like this:
    aaaaa 1.0000
    bbbbb 0.3000
    cccccc 0.7000
    dddddd 1.0000
    eeeeeee 0.0000

    With all that you are probab,y better off writing a Cobol program or do it in Culprit.

    The Culprit code would look like this:
    PATH01 record
    01510001 integercolumn fm '9999999'
    01510011 decimalcolumn fm '9.9999'