Re: COPY command and File access issue - Hewlett Packard

This is a discussion on Re: COPY command and File access issue - Hewlett Packard ; CM KSAM did not allow the reuse of deleted records and this process was necessary it there is a high volume of adds and deletes. KSAM XL now allows the reuse of deleted records. This may be a hold over ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: COPY command and File access issue

  1. Re: COPY command and File access issue

    CM KSAM did not allow the reuse of deleted records and this process was
    necessary it there is a high volume of adds and deletes. KSAM XL now
    allows the reuse of deleted records. This may be a hold over from the
    MPEV days......

    Therefore:
    This step may not be necessary if :
    a. performance is not a problem and
    b. chronological order of the records is not required.

    Thanks
    dp




    Dale Pepoon/MIS/Circuit City
    11/28/2007 04:40 PM

    To
    "Rao, Raghu"
    cc
    HP3000-L@RAVEN.UTC.EDU
    Subject
    Re: [HP3000-L] COPY command and File access issue





    Sorry to say but
    Remove all deleted transaction records.
    is exactly what it is doing...........more later..

    If any process is accessing this file you will not be able to perform this
    process.
    Notice it actually purges the DIVTRAN file.

    This is a KSAM file. When a record is deleted from a KSAM file it does
    not really delete the record. It just steps on some part of the record
    marking it as deleted. (Help me out someone... I think it is the first
    byte.)

    Here is the code with my comments.....
    !# Back up the whole file
    !COPY DIVTRAN.DATA,DIVTRANA.DATA
    !# did the back up work
    :IF CIERROR = 0
    !# Fcopy only the non deleted records
    ! FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    !# Purge the original file
    ! PURGE DIVTRAN.DATA
    !#Rename the new file that has no deleted records as the original file for
    tomorrows processing
    ! RENAME DIVTRANB.DATA,DIVTRAN.DATA
    !#Everything worked OK so lets purge the backup
    ! PURGE DIVTRANA.DATA
    !endif

    I think that KSAM files do not reuse deleted records. If this process
    does not happen periodically the file will fill up even when there are no
    records in the file.

    I do not know anything about AMISYS ... but I would not run this piece of
    code while people are accessing this file.....

    Thanks
    dp





    "Rao, Raghu"
    Sent by: HP-3000 Systems Discussion
    11/28/2007 04:15 PM
    Please respond to
    "Rao, Raghu"


    To
    HP3000-L@RAVEN.UTC.EDU
    cc

    Subject
    [HP3000-L] COPY command and File access issue






    Hi all,

    We have a job that runs twice daily, once at 12 noon and the other at
    8:30 nightly. The job runs fine on the nightly schedule without any
    issues, but the same job throws up a CIERROR 9135 on a COPY statement
    because the particular file is being accessed during day time. I have
    the following questions :

    1) If the file was not being accessed, then what are the series of
    statements inside the IF - ENDIF trying to do ? Please do not reply back
    stating "Remove all deleted transaction records"

    2) Is there a way to issue a COPY or FCOPY statement even if the file is
    being accessed ?

    3) This job is a standard Amisys job MEP0300. Does any other Amisys
    customers out there think this job should not be running during the day
    time ?


    NIGHTLY JOB RUN STDLIST :

    218 :COMMENT
    ************************************************** ***********
    219 :COMMENT ** Remove all deleted transaction records.
    **
    220 :COMMENT
    ************************************************** ***********
    221 :
    222 :SETJCW CIERROR,0
    223 :CONTINUE
    224 :COPY DIVTRAN.DATA,DIVTRANA.DATA
    225 :IF CIERROR = 0
    226 *** EXPRESSION TRUE
    227 : FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    228
    229 HEWLETT-PACKARD 31900A.05.04 FILE COPIER TUE, NOV 27, 2007,
    8:32 PM
    230 (C) HEWLETT-PACKARD CO. 1999
    231 *143*
    232 WARNING: FROMFILE IS EMPTY
    233 0 RECORDS PROCESSED *** 0 ERRORS
    234
    235 END OF SUBSYSTEM
    236 : PURGE DIVTRAN.DATA
    237 : RENAME DIVTRANB.DATA,DIVTRAN.DATA
    238 : PURGE DIVTRANA.DATA
    239 :ENDIF
    240 :LISTF DIVTRAN@.DATA,2
    241
    242 TUE, NOV 27, 2007, 8:32 PM
    243 ACCOUNT= AMISYS GROUP= DATA
    244
    245 FILENAME CODE ------------LOGICAL RECORD-----------
    ----SPACE----
    246 SIZE TYP EOF LIMIT R/B SECTORS
    #X MX
    247
    248 DIVTRAN 84B FAK 0 1000 46 320
    2 *
    249
    250

    DAYTIME JOB RUN STDLIST :

    218 :COMMENT
    ************************************************** ***********
    219 :COMMENT ** Remove all deleted transaction records.
    **
    220 :COMMENT
    ************************************************** ***********
    221 :
    222 :SETJCW CIERROR,0
    223 :CONTINUE
    224 :COPY DIVTRAN.DATA,DIVTRANA.DATA
    225 ^
    226 COPY command cannot open the source file. (CIERR 9135)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
    227 :IF CIERROR = 0
    228 *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING
    ELSEIF/ELSE
    229 /ENDIF
    230 : FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    231 : PURGE DIVTRAN.DATA
    232 : RENAME DIVTRANB.DATA,DIVTRAN.DATA
    233 : PURGE DIVTRANA.DATA
    234 :ENDIF
    235 *** RESUME EXECUTION OF COMMANDS
    236 :LISTF DIVTRAN@.DATA,2
    237
    238 WED, NOV 28, 2007, 12:01 PM
    239 ACCOUNT= AMISYS GROUP= DATA
    240
    241 FILENAME CODE ------------LOGICAL RECORD-----------
    ----SPACE----
    242 SIZE TYP EOF LIMIT R/B SECTORS
    #X MX
    243
    244 DIVTRAN * 84B FAK 3 1000 46 320
    2 *
    245
    246

    Thanks in advance for your kind replies.

    With Best Regards from
    Raghu Rao


    Confidentiality Notice:
    The information contained in this electronic message is intended for the
    exclusive use of the individual or entity named above and may contain
    privileged or confidential information. If the reader of this message is
    not the intended recipient or the employee or agent responsible to deliver
    it to the intended recipient, you are hereby notified that dissemination,
    distribution or copying of this information is prohibited. If you have
    received this communication in error, please notify the sender immediately
    by telephone and destroy the copies you received.


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *



    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: COPY command and File access issue

    I seem to recall cm ksam having a ;reuse parm on the build command?
    ________________________________________
    From: HP-3000 Systems Discussion [HP3000-L@RAVEN.UTC.EDU] On Behalf Of DalePepoon [Dale_Pepoon@CIRCUITCITY.COM]
    Sent: Thursday, 29 November 2007 9:23 AM
    To: HP3000-L@RAVEN.UTC.EDU
    Subject: Re: [HP3000-L] COPY command and File access issue

    CM KSAM did not allow the reuse of deleted records and this process was
    necessary it there is a high volume of adds and deletes. KSAM XL now
    allows the reuse of deleted records. This may be a hold over from the
    MPEV days......

    Therefore:
    This step may not be necessary if :
    a. performance is not a problem and
    b. chronological order of the records is not required.

    Thanks
    dp




    Dale Pepoon/MIS/Circuit City
    11/28/2007 04:40 PM

    To
    "Rao, Raghu"
    cc
    HP3000-L@RAVEN.UTC.EDU
    Subject
    Re: [HP3000-L] COPY command and File access issue





    Sorry to say but
    Remove all deleted transaction records.
    is exactly what it is doing...........more later..

    If any process is accessing this file you will not be able to perform this
    process.
    Notice it actually purges the DIVTRAN file.

    This is a KSAM file. When a record is deleted from a KSAM file it does
    not really delete the record. It just steps on some part of the record
    marking it as deleted. (Help me out someone... I think it is the first
    byte.)

    Here is the code with my comments.....
    !# Back up the whole file
    !COPY DIVTRAN.DATA,DIVTRANA.DATA
    !# did the back up work
    :IF CIERROR = 0
    !# Fcopy only the non deleted records
    ! FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    !# Purge the original file
    ! PURGE DIVTRAN.DATA
    !#Rename the new file that has no deleted records as the original file for
    tomorrows processing
    ! RENAME DIVTRANB.DATA,DIVTRAN.DATA
    !#Everything worked OK so lets purge the backup
    ! PURGE DIVTRANA.DATA
    !endif

    I think that KSAM files do not reuse deleted records. If this process
    does not happen periodically the file will fill up even when there are no
    records in the file.

    I do not know anything about AMISYS ... but I would not run this piece of
    code while people are accessing this file.....

    Thanks
    dp





    "Rao, Raghu"
    Sent by: HP-3000 Systems Discussion
    11/28/2007 04:15 PM
    Please respond to
    "Rao, Raghu"


    To
    HP3000-L@RAVEN.UTC.EDU
    cc

    Subject
    [HP3000-L] COPY command and File access issue






    Hi all,

    We have a job that runs twice daily, once at 12 noon and the other at
    8:30 nightly. The job runs fine on the nightly schedule without any
    issues, but the same job throws up a CIERROR 9135 on a COPY statement
    because the particular file is being accessed during day time. I have
    the following questions :

    1) If the file was not being accessed, then what are the series of
    statements inside the IF - ENDIF trying to do ? Please do not reply back
    stating "Remove all deleted transaction records"

    2) Is there a way to issue a COPY or FCOPY statement even if the file is
    being accessed ?

    3) This job is a standard Amisys job MEP0300. Does any other Amisys
    customers out there think this job should not be running during the day
    time ?


    NIGHTLY JOB RUN STDLIST :

    218 :COMMENT
    ************************************************** ***********
    219 :COMMENT ** Remove all deleted transaction records.
    **
    220 :COMMENT
    ************************************************** ***********
    221 :
    222 :SETJCW CIERROR,0
    223 :CONTINUE
    224 :COPY DIVTRAN.DATA,DIVTRANA.DATA
    225 :IF CIERROR = 0
    226 *** EXPRESSION TRUE
    227 : FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    228
    229 HEWLETT-PACKARD 31900A.05.04 FILE COPIER TUE, NOV 27, 2007,
    8:32 PM
    230 (C) HEWLETT-PACKARD CO. 1999
    231 *143*
    232 WARNING: FROMFILE IS EMPTY
    233 0 RECORDS PROCESSED *** 0 ERRORS
    234
    235 END OF SUBSYSTEM
    236 : PURGE DIVTRAN.DATA
    237 : RENAME DIVTRANB.DATA,DIVTRAN.DATA
    238 : PURGE DIVTRANA.DATA
    239 :ENDIF
    240 :LISTF DIVTRAN@.DATA,2
    241
    242 TUE, NOV 27, 2007, 8:32 PM
    243 ACCOUNT= AMISYS GROUP= DATA
    244
    245 FILENAME CODE ------------LOGICAL RECORD-----------
    ----SPACE----
    246 SIZE TYP EOF LIMIT R/B SECTORS
    #X MX
    247
    248 DIVTRAN 84B FAK 0 1000 46 320
    2 *
    249
    250

    DAYTIME JOB RUN STDLIST :

    218 :COMMENT
    ************************************************** ***********
    219 :COMMENT ** Remove all deleted transaction records.
    **
    220 :COMMENT
    ************************************************** ***********
    221 :
    222 :SETJCW CIERROR,0
    223 :CONTINUE
    224 :COPY DIVTRAN.DATA,DIVTRANA.DATA
    225 ^
    226 COPY command cannot open the source file. (CIERR 9135)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
    227 :IF CIERROR = 0
    228 *** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING
    ELSEIF/ELSE
    229 /ENDIF
    230 : FCOPY FROM=DIVTRAN.DATA;TO=(DIVTRANB.DATA)
    231 : PURGE DIVTRAN.DATA
    232 : RENAME DIVTRANB.DATA,DIVTRAN.DATA
    233 : PURGE DIVTRANA.DATA
    234 :ENDIF
    235 *** RESUME EXECUTION OF COMMANDS
    236 :LISTF DIVTRAN@.DATA,2
    237
    238 WED, NOV 28, 2007, 12:01 PM
    239 ACCOUNT= AMISYS GROUP= DATA
    240
    241 FILENAME CODE ------------LOGICAL RECORD-----------
    ----SPACE----
    242 SIZE TYP EOF LIMIT R/B SECTORS
    #X MX
    243
    244 DIVTRAN * 84B FAK 3 1000 46 320
    2 *
    245
    246

    Thanks in advance for your kind replies.

    With Best Regards from
    Raghu Rao


    Confidentiality Notice:
    The information contained in this electronic message is intended for the
    exclusive use of the individual or entity named above and may contain
    privileged or confidential information. If the reader of this message is
    not the intended recipient or the employee or agent responsible to deliver
    it to the intended recipient, you are hereby notified that dissemination,
    distribution or copying of this information is prohibited. If you have
    received this communication in error, please notify the sender immediately
    by telephone and destroy the copies you received.


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *



    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread