CA IDMS IUA EIUA

Re:Get storage

  • 1.  Re:Get storage

    Posted 07-22-2009 08:50 AM
    Thanks to Tommy's and Peter's suggestion, I am now getting a clean
    compile.
    But I don't seem to be getting a valid pointer back at run time. Can
    anyone
    provide a way to convert the pointer to a displayable format? Or better
    yet, some sample code that uses the pointer parameter for ""get scratch""?

    I wish the storage interface had separate ""get"" and ""put"" commands, like
    the
    scratch and queue interfaces do. I am having some difficulty
    determining
    which parameters apply to which situation.
    "
    IDMS 3rd-party providers forum
    IDMSVENDOR-L@LISTSERV.IUASSN.COM
    SMTP
    IDMSVENDOR-L@LISTSERV.IUASSN.COM
    IDMSVENDOR-L@LISTSERV.IUASSN.COM
    SMTP








    Normal

    Normal
    Re: Get storage
    "I believe the occurs depending on refers only to the END location syntax.

    In a structure like:
    01 W-STORAGE.
    03 W-BYTE PIC X OCCURS 1 TO 10000 DEPENDING ON ....
    03 W-ADDITIONAL-DATA.
    05 ......

    I believe field names from w-additional-data and on cannot be addressed
    correctly, you cannot determine the address or offset of w-additional-data
    at compile time, and I believe the data location of elements in linkage
    storage is the start location of the 01 plus an offset, that is of course
    unknown at compile time if the prior data is variable length.

    Other than that, it should work.
    Chuck, have you tried to add data after the variable part, if so, how much
    storage do yo get allocated.

    Tommy Petersen
    110 Cokesbury Rd
    Room 542H
    Lebanon, NJ 08833

    Phone:
    Internal 200 - 3699
    External (908) 236-3699
    Fax: (908) 236-3692




    Gary Bryson
    <GBryson@DELTA.OR
    G> To
    Sent by: IDMS IDMS-L@LISTSERV.IUASSN.COM
    Public Discussion cc
    Forum
    <IDMS-L@LISTSERV. Subject
    IUASSN.COM> Re: Get storage


    07/24/2009 03:02
    PM


    Please respond to
    IDMS Public
    Discussion Forum
    <IDMS-L@LISTSERV.
    IUASSN.COM>






    Kay,

    The following paragraph is from the description of GET STORAGE in the
    COBOL DML manual:

    Note: Advantage CA-IDMS does not support the use of an OCCURS
    DEPENDING ON clause within 01-level-storage-data-location.

    It appears that Charles' example will always get the same amount of
    storage, which, if I understand correctly, is not what you want to do.

    I have included below an example of how your assembler sub-routine might
    look. If you decide to use it, please contact me for the code needed to
    free the area.

    GETSTG CSECT
    GETSTG AMODE ANY
    GETSTG RMODE ANY
    YREGS
    @PARM EQU R11 BASE REGISTER FOR PARAMETERS
    @BASE EQU R12 BASE REGISTER FOR PROGRAM
    *
    WKAREA DSECT
    SAVE DS 18F SAVE AREA
    VL_REC DS XL32767 KAY'S RECORD AREA
    WKAREAL EQU *-WKAREA          LENGTH OF DSECT
    *
    PARM DSECT
    VL_REC_L DS F LENGTH OF GET STORAGE AREA
    VL_REC_P DS F POINTER TO GET STORAGE AREA
    *
    GETSTG CSECT
    SAVE (14,12),,* SAVE REGISTERS
    LR @BASE,R15
    USING GETSTG,@BASE
    LR R10,R13 SAVE HIGH SAVE AREA ADDRESS
    *
    LR @PARM,R1 PARAMETER POINTER OUT OF HARMS WAY
    USING PARM,@PARM MAKE PARMS USABLE
    *
    L R0,VL_REC_L LENGTH FOR GETMAIN
    GETMAIN RU,LV=(R0),LOC=31
    LR R13,R1 ADDRESS OF ACQUIRED AREA TO R13
    USING WKAREA,R13 MAKE IT USABLE
    *
    ST R13,8(R10) SAVE FORWARD POINTER
    ST R10,4(R13) SAVE BACKWARD POINTER
    * -------------------------------------------------------------------
    LA R3,VL_REC GET ADDRESS OF COBOL'S STORAGE
    ST R3,VL_REC_P MAKE THE RESULT AVAILABLE TO CALLER
    RETURN DS 0H
    L R13,SAVE+4 RESTORE OLD SAVE AREA
    RETURN (14,12),RC=0
    END GETSTG

    Gary Bryson
    EDS/Delta Dental: Denti-Cal Systems Group
    gbryson@delta.org





    The information contained in this e-mail message and any attachments is
    confidential and intended only for the addressee(s). If you are not an
    addressee, you may not copy or disclose the information, or act upon it,
    and you should delete it entirely from your e-mail system. Please notify
    the sender that you received this e-mail in error.