Results 1 to 2 of 2

Thread: Number Datatype

  1. #1
    Join Date
    Oct 2003
    Posts
    5

    Thumbs up Unanswered: Number Datatype

    hi,
    I am in the process of Embedding Oracle in Cobol
    application program.I need to know the
    equivalent Host variables for the following
    Number(5)
    Number(10)
    Number(p,s)
    Can anyone help me.

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: Number Datatype

    Number datatype is defined in Cobol as PIC9(size)[Vscale]

    Oracle NUMBER(6,2) would be PIC 9(6) V99.

    So you would want

    03 VAR1 PIC 9(05).
    03 VAR2 PIC 9(10).
    03 VAR3 PIC 9(99)V99.

    If you have trouble retrieving numbers from Oracle into the Cobol Number datatype, retrieve it into a X (character) datatype, and then move that into a Number field.

    Attached is a example of Embedded sql in cobol


    Originally posted by preeyalaksh
    hi,
    I am in the process of Embedding Oracle in Cobol
    application program.I need to know the
    equivalent Host variables for the following
    Number(5)
    Number(10)
    Number(p,s)
    Can anyone help me.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •