Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Automatic version incrementation with convention STD-SEQUENCE

Members are to be added to a library in a preset version format, whereby the version is to be automatically incremented.

/start-lms

//modify-logging-parameters logging=*maximum ------------------------------  (1) 

//open-library library=bsp11.bib,mode=*update -----------------------------  (2)

LIBRARY IS CLEARED AND PREPARED

//modify-type-attributes type=s,convention=*std-sequence(example=v001) ----  (3)

//show-type-attributes type=s ---------------------------------------------  (4)

INPUT  LIBRARY= :1OSQ:$USER.BSP11.BIB
TYPE       = S
SUPER-TYPE = *NONE

BASE-TYPE  = S
CONVENTION = *STD-SEQUENCE

EXAMPLE    = V001
INIT-ELEM-P= *NONE

ADMINISTRAT= *NONE

STORAGE    = *NONE        WR-CONTROL = *NONE

//add to-element=library-element(element=test(version=*increment),type=s) -  (5)

input1

*END

INPUT  SYSDTA
OUTPUT LIBRARY= :1OSQ:$USER.BSP11.BIB

OUTPUT ELEMENT= (S)TEST/V001(0001)/2013-03-01

        ADD (S)TEST/V001(0001)/2013-03-01

(1)

In addition to error messages, positive acknowledgments are also logged.

(2)

Library BSP11.BIB is opened for reading and writing; no S-type member is present.

(3)

Set up the convention STD-SEQUENCE for type S with the example given in EXAMPLE for the version format.

(4)

Display type attributes for member type S as a check.

(5)

Create the first member via *SYSDTA. The member is created under type S with the name “test” through automatic version incrementation.

//add-element to-element=(element=test(version=*increment),type=s) -------   (6) 

input1

*END

INPUT  SYSDTA
OUTPUT ELEMENT= (S)TEST/V002(0001)/2013-03-01

        ADD (S)TEST/V002(0001)/2013-03-01

//add to-element=library-element(element=test(version=w001),type=s) ------   (7)

input1

*END

INPUT  SYSDTA
OUTPUT ELEMENT= (S)TEST/W001(0001)/2013-03-01

        ADD (S)TEST/W001(0001)/2013-03-01

//add to-element=library-element(element=test(version=999),type=s) -------   (8)

input1

*END

OUTPUT ELEMENT= (S)TEST/999/2013-03-01

%  LMS0024 ERROR ON LIBRARY ':1OSQ:$USER.BSP11.BIB', *** PLAM ERROR CODE '0476'.
%  PLA0476 VERSION OR PREFIX NOT ACCORDING TO EFFECTIVE CONVENTION
     NO ADD (S)TEST/999/2013-03-01 , ERROR OCCURRED
SKIPPED:input1

//add to-element=(element=test(version=*highest-existing),type=s), -
//     write-mode=*any ---------------------------------------------------   (9)

input1

*END

INPUT  SYSDTA
OUTPUT ELEMENT= (S)TEST/W001(0002)/2013-03-01

        ADD (S)TEST/W001(0002)/2013-03-01 , OUTPUT REPLACED

(6)

Maintain the sequence with *INCREMENT, i.e. a second member with the same name and type but with a version incremented by one is created.

(7)

Maintain the sequence on changing version, i.e. a third member is created with the same name and type but, through explicit specification of the version, with version W001.

(8)

An attempt is made to add a further member that does not have a version format corresponding to the convention STD-SEQUENCE. This statement is rejected by LMS.

(9)

Overwrite the highest version with type S and name “test”.

//show-element-attributes ------------------------------------------------- (10) 

INPUT  LIBRARY= :1OSQ:$USER.BSP11.BIB
TYP NAME VER  (VAR#) DATE        NAME VER  (VAR#) DATE
(S) TEST V001 (0001) 2013-03-01   TEST V002 (0001) 2013-03-01
(S) TEST W001 (0002) 2013-03-01

      3 (S)-ELEMENT(S) IN THIS TABLE OF CONTENTS

//end --------------------------------------------------------------------- (11)

(10)

Overview of members present.

(11)

Terminate the LMS run.