Total Supra DML

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17
At a glance
Powered by AI
The document talks about various database commands like OPENX, CLOSX, ADD-M, ADDVA, FINDX etc and explains their parameters and usage.

The two modes of CLOSX command are PART and COMP. PART does not use operating system close and sets the file mode to IUPD. COMP uses operating system close and resets the file mode to null.

The parameters of ADD-M command are status, file, control-key, data-list, data-area. It is used to add a record to a master file. The control-key, data-list and data-area needs to be provided for the record being added.

TOTAL DML COMMANDS DESCRIPTION

AUTHOR : HARI SHANKAR

TOTAL SUPRA DML OPERATIONS

DATA MANIPULATION LANGUAGE:

DML commands used in the TOTAL/SUPRA file operations can be broadly classified into the following
categories:

 Initiation/Termination Category (Task and File)


 Addition Category
 Update Category
 Retrieval Category
 Deletion Category

These DML commands can be applied on both the master and variable files.
The syntax, parameters to be passed and error handling are some of the concepts dealt here.

SYNTAX:

CALL ‘DATBAS’ USING dmlcommand, status [,file] [,refer][,linkpath]


[,control-key][,realm][,argument][,qualifier][,access]
[,data-list][,data-area][,dbmod][,task][,options], end.

The parameters dmlcommand,status and end are all mandatory for all the catogeries of the DML command.

The following table will list the parameters required for each DML commands in their respective catogery.

The catogery of the DML is given by the following code :

I - Initiation/Termination Category (Task and File)


A- Addition Category
U- Update Category
R- Retrieval Category
D- Deletion Category

IO3-SOTS Page 1 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

Table 1: Parameters required for each DML command

C C S F R L C R A Q A D D D T O E
O A T I E I O E R U C A A B A P N
M T A L F N N A G A C T T M S T D
M O T E E K T L U L E A A O K I
A G U R P R M M I S L A D O
N E S A O E F S I R N
D R T L N I S E S
Y H K T E T A
E R
Y
SINON I X X X X X X
SINOF I X X X
OPENX I X X X
CLOSX I X X X
ADD-M A X X X X X X
ADDVA A X X X X X X X X
ADDVB A X X X X X X X X
ADDVC A X X X X X X X X
ADDVR U X X X X X X X X
WRITM U X X X X X X
WRITV U X X X X X X X X
DEL-M D X X X X
DELVD D X X X X X X X X
READD R X X X X X X X X
READM R X X X X X X
READR R X X X X X X X X
READV R X X X X X X X X
RDNXT R X X X X X X
FINDX R X X X X X X X

The following table gives the details of the DML command usage in all the catogeries.

IO3-SOTS Page 2 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

Table 2: DML Command Usage


Command Minimum Access Types of Files Function
Capability Manipulated
ADD-M Update Master Adds a new record to a
master file.
ADDVA Update Variable Adds a new record to the
variable file, logically
following a record
specified by an Internal
Reference Point.
ADDVB Update Variable Adds a new record to the
variable file, logically
preceding a record
specified by an Internal
Reference Point
ADDVC Update Variable Adds a new record to a
variable file logically at
the end of all associated
chains.
ADDVR Update Variable Changes keys and/or
record code in a variable
record.
DEL-M Update Master Deletes a master record.
DELVM Update Variable Deletes a variable
record.
WRITM Update Master Updates master records.
WRITV Update Variable Updates variable
records.
READD Read Variable Directly retrieves the
logical record mentioned
in the database.
READM Read Master Retrieves a specific
master record according
to the control-key.
READR Read Variable Reads logically
backward along the
chain from a specified
path.
READV Read Variable Reads logically forward
along the chain from a
specified path.
FINDX Read Master,Variable Searches for the record
with a specific criteria
and retrieves it.
RDNXT Read Master,Variable Retrieves records in a
physical or logical
sequence from a
specified point.
SINON N/A (Not file oriented) Performs task initiation.
SINOF N/A (Not file oriented) Performs task
termination.
OPENX Read Master,Variable Logically and if
necessary, physically
opens files for all types
of processing.

IO3-SOTS Page 3 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

CLOSX Read Master,Variable Logically and, if


necessary, physically
closes files.

DML examples with respect to SOTS :

In SOTS the standard practise followed is to declare working storage variables for the dml-commands.
They look like the following :

10 TOTAL-DATA
05 SINON PIC X(5) VALUE ‘SINON’.
05 SINOF PIC X(5) VALUE ‘SINOF’.
05 OPENX PIC X(5) VALUE ‘OPENX’.
05 CLOSX PIC X(5) VALUE ‘CLOSX’.
05 ENDP PIC X(5) VALUE ‘END.’
05 RLSE PIC X(5) VALUE ‘RLSE’.

Task Initiation and termination :

SINON: Parameters (SINON,status,access,dbmod,task,options,end).

The syntax for the SINON command is as follows :

For Online:

CALL ‘DATBAS’ USING SINON STAT ENDP.

For Batch:
CALL ‘DATBAS’ USING SINON STAT RDONLY GENNAME WK-JOBNAME OPTIONS ENDP.

Parameter descriptions :

STAT:
Here STAT is the working strorage variable which contains the error code for the DML manipulation.
It is a PIC X(4) field.
If the value of STAT is ‘****’ it means DML-OPERATION is succesful.
The programmer should handle the errors thrown by the DML logically.

ACCESS:
Only for batch – defines the type of commands to be supported by the program.

Values:

RDONLY : Only read commands will be supported.


UPDATE : Read and update commands are both supported.

DBMOD:
Only for Batch – defines the field containing the name of the Database Description Module.
This DBMOD is generated when the DDL program is executed.
The name is of 8 characters in length.
In SOTS this value is passed thru’ the Linkage section and contains the value DUMMYGEN.

TASK:
Batch – Defines the field containing the name of the task.Eight characters in length.

IO3-SOTS Page 4 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

It is done by either calling LLJOBNAM or XMJOBNAM using the WK-JOBNAME before the SINON is
issued.
Online – Task is defined in the TOTAL TASK Table for multi task processing.

OPTIONS:
Batch – Defines the field containing the desired logging options to be supported by single-task TOTAL.

FORMAT :

LOGOPTS = {N/type(s)}[ [ ,]SYSnnn] [ [,] CORE={nnnn,nnnl}] [,] {blank/END.}

For SOTS the standard option followed is given below :

05 OPTIONS PIC X(14) VALUE 'LOGOPTS=N,END.'.

value N indicates no logging is required for this program and during this run.

For the remaining options kindly refer the TOTAL Application Programming Reference Manual.

The associated error returns are given below :

****, ACTV, DUPT, FUNC, ICOR, IPAR, NOTO, TFUL, XERR.

Refer to the TOTAL Messages and Codes Reference Manual for explanations,causes and corrective
actions.

**************************************************************************************

SINOF: Parameters ( SINOF status,task,end)

The syntax for the SINOF command is as follows :

For online –

CALL 'DATBAS' USING SINOF STAT ENDP.

For batch –

CALL 'DATBAS' USING SINOF STAT WK-JOBNAME ENDP.

TASK:

The task parameter is same as the SINON option.

Error Codes:

****, FUNC, IPAR, NACT, NOTO.

OPENX: Parameters ( OPENX, status, realm, end).

The OPENX command initializes one or more files for read-only or update mode.
In SOTS the online modules need not issue any OPENX commands since all the files are avaliable for the
modules and any task can be performed on them.
CALL 'DATBAS' USING OPENX STAT REALM ENDP.

IO3-SOTS Page 5 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

REALM:

This parameter is used to mention the list of all the files to be opened in the mode.

Format:

REALM = { ALL./filemodestatEND.}
or
REALM = {entry1[,]entry2[,]……..entryn[,]END.}

In the first format if ALL. is used then all the TOTAL files will be opened in the mode that is specified.
If a file name is used then that particular file will be opened in the specified mode.
If multiple files need to opened then the OPENX DML has to be performed that many number of times.
Refer prog OM60ATOM,OM60PR50 for this type of format.

The second format can be used to open multiple files in the mode that is mentioned using the OPENX
statement.
Refer prog OM60PH50,OM60PN50 for this type of format.

Modes of OPENX:
Specifies the type of processing to be performed:

READ – The files opened in this mode can have only read operations performed on them.The files are not
locked and cannot be updated.

IUPD – The file cannot be updated by all the tasks and may or may not be locked depending on the
program.

SUPD – The file is shared for updation.The file is locked and may be updated by all the tasks using the
same copy of the TOTAL.

EUPD – The file is to be exclusively updated by this task.The file may be read but cannot be updated by
any other task.

Stat:
If a file name has been specified for this entry then TOTAL will return the status code here for the
operation on that particular file.
If ALL. option is given then the field will not be set.Only the command STAT will have the return code for
the overall operation.

Error Codes:

****, EUPD, FATL, FNAV, FUNC, FNTF, ICOR, IOER, IPAR, ISIZ, LOCK, NACT, NOTO, READ,
RSRV, SHRE, XERR.

The return codes FNTF and ISIZ will not appear in the REALM stat.

**************************************************************************************

CLOSX: Parameter (CLOSX,status,realm,end)

Surprisingly none of the batch jobs also perform this DML.

The parameters are similar to the OPENX except for the mode of the REALM parameter.

IO3-SOTS Page 6 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

Modes of CLOSX :

PART – No operating system close is to be used. The file is unlocked if necessary and the mode is set to
IUPD mode.Any task may read the file, but no task will be able to update it.

COMP - The operating system close is to be used. The file is unlocked if neccesary as indicated by the
current status.The file mode is reset to null.No task may be able to access the file except to open it.

Assoicated Error Codes:

****, EUPD,FATL, FUNC, FNTF, ICOR, IPAR, ISIZ, NACT, NOTO, XERR.

**************************************************************************************
Addition Category:

ADD-M: Parameter ( ADD-M, status, file, control-key, data-list, data-area, end)

An example of the ADD-M DML in SOTS:

CALL 'DATBAS' USING ORDM-FUNC STAT ORDM


ORDM-ORD-NO ORDM-LIST ORDM-IOAREA ENDP.

In the above example a record is being added to the master file ORDM.

The details of the parameter are described below

File:
The file contains the name of the master file to which the record is to be added.

Control-Key:
The control key contains the record key of the master record to be processed.
This must be included in the data-list and the data-area parameters.
Here the control key is ORDM-ORD-NO.

Data-list:
The data-list defines the variable field which contains the list of element names.
Here ORDM-LIST is the data-list.This can be copied from the OM60.MODULES.COBOL into the
working storage section.The segements that need to be stored alone are included and others are ignored.
Control Key is a mandatory field in the data-list for ADD-M DML.

Data-area:
The data-area defines the area of the memory to be used as an I/O area for the data elements.
Here in this example ORDM-IOAREA is used as the data area .Only the variables corrseponding to the
segment in the data list defined earlier are to be copied.

Associated Error Codes:


****, *BCR, BCTL, CSIZ, DUPM, ESIZ, FNOP, FTYP, FULL, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ,
IVDL, LOCK, MFNF, NACT, NOTO, SNTF, UCTL, XERR.

**************************************************************************************

ADDVA: Parameters (ADDVA, status, file, refer, linkpath, control-key, data-list, data-area, end.)

IO3-SOTS Page 7 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

An eg of the ADDVA command is shown below :

CALL 'DATBAS' USING OLGV-FUNC STAT OLGV


OLGV-REFER ORDMLKOL OLGV-ORD-NO OLGV-LIST
OLGV-IOAREA ENDP.

Let us see the list of parameters in detail :

REFER:

The refer field will contain the internal reference point of the record after which your record is to be added.
If the field has value LKxx the record will be added at the end of all the linkpaths.
If the field has value rrrr then the record will be added after the record in that particular reference position.

After the succesful addition the refer will contain the IRP(Internal Reference Point) of the record added.

LINKPATH:

Defines a field containing the name of the linkpath.


Here ORDMLKOL is the name of the linkpath.

Associated Error Codes:

****, *BCR, CSIZ, ESIZ, FATL, FNOP, FTYP, FULL, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ, IVDL,
IVEL, IVRC, LOCK, MFNF, MLNF, MRNF, NACT, NMLK, NOIO, NOTO, NSMR, SNTF, UCTL,
VFNF, VLNF, XERR.
**************************************************************************************

ADDVB: Parameter ( ADDVB, status, file, refer, linkpath, control-key, data-list, data-area, end.)

REFER:

The refer field will contain the internal reference point of the record before which your record is to be
added.
If the field has value LKxx the record will be added at the beginning of this linkpath and at the end of all
the linkpaths.
If the field has value rrrr then the record will be added before the record in that particular reference
position.

After the succesful addition the refer will contain the IRP of the record added.

Associated Error Codes:

****, *BCR, CSIZ, ESIZ, FATL, FNOP, FTYP, FULL, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ, IVDL,
IVEL, IVRC, LOCK, MFNF, MLNF, MRNF, NACT, NMLK, NOIO, NOTO, NSMR, SNTF, UCTL,
VFNF, VLNF, XERR.

**************************************************************************************

ADDVC: Parameters ( ADDVC, status, file, refer, linkpath, control-key, data-list, data-area, end.)

IO3-SOTS Page 8 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

CALL 'DATBAS' USING REJV-FUNC STAT REJV


REJV-REFER DATMLK01 REJV-KEY REJV-LIST
REJV-IOAREA ENDP.

In the above statement the a record has been added to the variable file REJV

All the parameters are the same except the value in the refer field is ignored before the execution of the
command.After the execution the IRP of the record added is returned to this field.

Associated Error Codes:

****, *BCR, CSIZ, ESIZ, FATL, FNOP, FTYP, FULL, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ, IVDL,
IVEL, IVRC, LOCK, MFNF, MLNF, MRNF, NACT, NMLK, NOIO, NOTO, NSMR, SNTF, UCTL,
VFNF, VLNF, XERR.

**************************************************************************************
Updation Category:

ADDVR: Parameters ( ADDVC, status, file, refer, linkpath, control-key, data-list, data-area, end.)

The ADDVR command logially relinks an existing variable records without physically removing the
record.TOTAL examines every control-key defined for the record by comparing the new data area to the
TOTAL’s IO area.If a control key has changed, TOTAL unlinks the record from the old chain and logically
adds the record to the end of the new chain controlled by the key in the dataarea.If the control key has not
changed the TOTAL does not disturb the linkage.Logically the ADDVR is a combiantion of DELVD
followed by the ADDVC command.

An example :

CALL 'DATBAS' USING CCRV-FUNC STAT CCRV


CCRV-REFER DCRMLKCC WK-SEARCH-CRITERIA CCRV-LIST
CCRV-IOAREA ENDP.

REFER:

Do not use LKxx in the refer field.Must contain the IRP of the record to be retrieved.

Associated Error Codes:

****, *BCR, CSIZ, ESIZ, FATL, FNOP, FTYP, FULL, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ, IVDL,
IVEL, IVRC, LOCK, MFNF, MLNF, MRNF, NACT, NMLK, NOIO, NOTO, NSMR, SNTF, UCTL,
VFNF, VLNF, XERR.

**************************************************************************************

WRITM: Parameters( WRITM, status, file, control-key, data-list, data-area, end)

IO3-SOTS Page 9 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

An Example of the WRITM:

CALL 'DATBAS' USING RSTM-FUNC RSTM-STAT RSTM


RSTM-INTERFACE-TYPE RSTM-LIST RSTM-IOAREA ENDP.

Parameters:

Control-Key:
The control-key should not be changed.

Programming considerations:

The record is to be read first then only the command can be executed.
The record must be explicitly held by the read statement at the time of the execution in the online modules.

Associated Error Codes:

****, BCTL, CSIZ, ESIZ, FNOP, FTYP, FUNC, HELD, ICOR, IPAR, IRLC, ISIZ, IVDL, LOCK, MFNF,
NACT, NHLD, MOIO, NOTO, REPC, SNTF, UCTL, XERR.

**************************************************************************************
WRITV: Parameters ( WRITV, status, file, refer, linkpath, control-key, data-list, data-area, end.)

The WRITV command operates by rewriting the record whose IRP is in refer.
Parameters :

Refer:
The field must contain the IRP of the record to be updated.Must not have the value LKxx.
The programming considerations are the same as WRITM DML.

Associated Error Codes:


****, BCTL, CSIZ, ESIZ, FNOP, FTYP, FUNC, HELD, ICOR, IPAR, IRLC, ISIZ, IVDL, LOCK, MFNF,
MRNF, NACT, NHLD, NOIO, NOTO, REPC, SNTF, UCTL, XERR.
**************************************************************************************
Deletion Category:

DEL-M:Parameters (DEL-M, status, file, control-key, data-list, data-area, end.)

The command is used to delete the master record.The record is deleted by setting it to blanks.The free
space is made available immediately for allocation.

Control-key :
The control key should contain the record key of the master record to be deleted.

Programming considerations:

The record should be read before deletion and in case of online it should be explicitly held.
All the variable records linked to the master has to be deleted before the master record is deleted.

Associated Error Codes:


****, BCTL, CSIZ, ESIZ, FNOP, FTYP, FUNC, ICHN, ICOR, IMDL, IPAR, IRLC, ISIZ, LOCK, MFNF,
MRNF, NACT, NHLD, NOIO, NOTO, REPC, XERR.
**************************************************************************************

DELVD: Parameters (DELVD status, file, refer, linkpath, control-key, data-list, data-area, end.)

IO3-SOTS Page 10 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

Parameters:

Refer:
Refer must contain the IRP of the record to be deleted.Do not use LKxx.

Upon the completion it contains the IRP of the previous logical record.If the deleted record was logically
the first record then it will contain LKxx.

Programming Considerations:
They are the same as the DEL-M command.

Associated Error Codes:

****, CSIZ, ESIZ, FATL, FNOP, FTYP, FUNC, ICHN, ICOR, IPAR, IRLC, ISIZ, LOCK, MFNF, MLNF,
MRNF, NACT, NHLD, NMLK, NOIO, NOTO, NSMR, REPC, RFLK, UCTL, VFNF, VLNF, XERR.
**************************************************************************************
Retrieval Category:

READD: Parameter (READD, status, file, refer, linkpath, control-key, data-list, data-area, end)

Parameters :

Refer:
Defines the field containing the IRPof the variable record to be read.Do not use LKxx.
Upon completion this will conatin the IRP of the record read.

End:
It should conatin one of the following :
END. – if the record is to be held.
RLSE – if the record is not to be held.

Associated Error Codes:


****, *IVL, *PNR, CSIZ, ESIZ, FNOP, FNTF, FTYP, FUNC, HELD, ICHN, ICOR, IOER, IPAR, IRLC,
ISIZ, IVDL, IVRC, NACT, NOIO, NOTO, NQSP, RFLK, SNTF, VFNF, VLNF, XERR.
**************************************************************************************
READM:Parameter (READM, status, file, control-key, data-list, data-area, end)

Parameters:

Control-key:
This field must contain the record key of the record to be fetched from the master file.

Associated Error Codes:


****, *ICH, BCTL, CSIZ, ESIZ, FNOP, FTYP, FUNC, HELD, ICOR, IOER, IPAR, IRLC, ISIZ, IVDL,
MFNF, MRNF, NACT, NOIO, NOTO, NQSP, SNTF, XERR.

**************************************************************************************
READV: Parameters ( READV, status, file, refer, linkpath, control-key, data-list, data-area, end)

The READV command operates by logically following the forward pointers along a specified linkpath to
read a record.

Parameters:

IO3-SOTS Page 11 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

Refer:
Defines the field containing LKxx or the IRP.

If refer contains the LKxx the first logical record is retrieved in the chain.
Upon completion, refer contains the IRP of the record just read.
The value .END is placed in the refer if the rpevious read was end-of-the-chain.

Associated Error Codes:


****, *ICH, *IVL, *PNR, CSIZ, ESIZ, FNOP, FTYP, FUNC, HELD, ICOR, IOER, IPAR, IRLC, ISIZ,
IVDL, MFNF, MLNF, MRNF, NACT, NOIO, NOTO, NQSP, SNTF, VFNF, VLNF, XERR.
**************************************************************************************
READR: Parameters ( READV, status, file, refer, linkpath, control-key, data-list, data-area, end)

The READR command operates by logically following the backward pointers along a specified linkpath to
read a record.

Parameters:

Refer:
Defines the field containing LKxx or the IRP.

If refer contains the LKxx the last logical record is retrieved in the chain.
Upon completion, refer contains the IRP of the record just read.
The value .END is placed in the refer if the rpevious read was beginning-of-the-chain.

Associated Error Codes:


****, *ICH, *IVL, *PNR, CSIZ, ESIZ, FNOP, FTYP, FUNC, HELD, ICOR, IOER, IPAR, IRLC, ISIZ,
IVDL, MFNF, MLNF, MRNF, NACT, NOIO, NOTO, NQSP, SNTF, VFNF, VLNF, XERR.

**************************************************************************************

FINDX: Parameters ( FINDX, status, file, qualifier, argument, data-list, data-area, end.)
This is used for retieving reords based on certain criteria by serial search.
Parameters:
Status: The status ENDC and END. indicate the end of the search process.
Qualifier:

The standard length of this qualifier field is 16 bytes.

For Master Files :


It indicates where to start the search in a master file.

BEGN
KEY=CONTROL-KEY
RRRR
If BEGN is specified the FINDX starts searching from the first physical rcord in the master file.
If a control key is specified then the search starts from the record having the control-key.
If the IRP is mentioned the search starts from that particular location.

For a variable file :

It can have one of the following formats :

FORMAT 1: { BEGN/rrrr, blank/SKIP, LINKPATH/SERIAL }


FORMAT 2: LINKPATHKEY=CONTROL-KEY

IO3-SOTS Page 12 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

FORMAT 1:
BEGN: It indicates that the search has to be performed from the first physical record of the file.
RRRR: It is the IRP from which search has to be performed.
SKIP: It is used to optimise the search by skipping the blank records that are blank.After the first
execution of the FINDX command the number of non-blank records in a cylinder is loaded into the field.
As each non-blank records are searched the counter gets decremented and when it reaches zero the search
continues to the next cylinder,thus optimizing the performance.
SERIAL: It is used when the search has to be done without any regards to the LINKPATH.The search will
continue serially and each record in the file will be tested for the condition.
LINKPATH: It is used to direct the search along the logical path and the search begins at the head of the
chain.
If the search has to be continued for another chain the field RRRR should have a value NEXT to indicate
the serach is carried over to the next chain.
FORMAT 2:
LINKPATH: It is used to start the search from the first record in the chain matching the control-key.
KEY: It will contain the control-key to detect the first variable record at the head of the chain for the
corresponding master record.

After the head of the chain is found the format is set to FORMAT 1 and the search continues.

Arugument :
This field is used to give the search criteria.

Format :
Element1[,]Element2[,]Element3[,]……Elementn[,]END.OPERATOR.val1[val2val3….valn]END.

Element1[,]Element2[,]Element3[,]……Elementn[,]
These are tha names of the elements upon which the comparison has to be performed.
These elements do not need to bee present in the datalist or area.
END.
Specifies the end of the parameter list.
.OPERATOR.
A 2 character entry which compares the element with the value.
The syntax are:
.GT., .LT., .EQ., .NE., .GE., .LE.
val1[val2val3….valn]
A list of data with which the element is compared.

Associated Error Codes:


****, *IVL, ASIZ, CSIZ, END. ENDC, ESIZ, FNOP, FNTF, FUNC, HELD, IARG, ICOR, IOER, IPAR,
IRLC, ISIZ, IVDL, IVLK, IVLK, IVRF, MFNF, MRNF, NACT, NOIO, NOTO, NQSP, SNTF, XERR.

**************************************************************************************
RDNXT: Parameter ( RDNXT, status, file, qualifier, data-list, data-area, end.)
This is used to serially retrieve records from the master and variable files.
The parameters and the error codes are all similar to the FINDX command.

**************************************************************************************

SAMPLE JCL TO RUN A PROGRAM HAVING DATABASE CALLS:

IO3-SOTS Page 13 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

In Test ( Using CICSDCHD region):

//SOTSTEST JOB (IBMIDS,HARI,409),'22275003079',


// NOTIFY=H03AEHS,CLASS=2,MSGCLASS=T,RESTART=STEPPROG
/*RESOURCE SYSTEM3 * TO BE INCLUDED FOR TEST RUN.
//SORTSTEP EXEC PGM=SORT
//SORTIN DD DSN=OM60.HU58BD1,DISP=SHR
//SORTOUT DD DSN=OM60CD.TEST.OUTPUT,UNIT=DISK,DISP=(,CATLG),
// DCB=LRECL=26,AVGREC=K,SPACE=(CYL,(16))
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=A
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK04 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK05 DD UNIT=DISK,SPACE=(CYL,(6))
//SYSIN DD DSN=H03AEHS.TEST.CNTLLIB(TESTCNTL),DISP=SHR
//**********************************************************************
//*TEST RUN FOR THE GEENRATION OF COMPLETED ORDERS
//STEPPROG EXEC PGM=TESTPROG,PARM=DUMMYGENSA,REGION=2048K
//STEPLIB DD DSN=LLS1.TESTLIB,DISP=SHR
// DD DSN=TISXA.DCHDSUP.INTERFLM,DISP=SHR
// DD DSN=TISXA.DCHDSUP.LINKLIB,DISP=SHR
// DD DSN=TISXA.DCHDSUP.ENVLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSU2UMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
//PDMSNAP DD SYSOUT=*
//CSIPARM DD DSN=OM60.CTLCDLIB(DCHDSUP),DISP=SHR *DESC SUPRA
//OM60TST1 DD DSN=OM60CD.TEST.OUTPUT,DISP=SHR *I/P OODV FILE
//OUTFILE1 DD DSN=OM60CD.TEST.OUTFILE3,DISP=OLD *O/P OODV FILE
//

For using the files from the A region use the following libs:

//STEPLIB DD DSN=TISXA.DCHASUP.INTERFLM,DISP=SHR
// DD DSN=TISXA.DCHASUP.LINKLIB,DISP=SHR
// DD DSN=TISXA.DCHASUP.ENVLIB,DISP=SHR
//CSIPARM DD DSN=OM60.CTLCDLIB(DCHASUP),DISP=SHR *DESC SUPRA

IO3-SOTS Page 14 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

In production:

//SOTSTEST JOB (IBMIDS,HARI,409),'22275003079',


// NOTIFY=H03AEHS,CLASS=2,MSGCLASS=T,RESTART=STEPPROG
//**RESOURCE SYSTEM3 * COMMENTED IN PRODUCTION
//SORTSTEP EXEC PGM=SORT
//SORTIN DD DSN=OM60.HU58BD1,DISP=SHR
//SORTOUT DD DSN=OM60CD.TEST.OUTPUT,UNIT=DISK,DISP=(,CATLG),
// DCB=LRECL=26,AVGREC=K,SPACE=(CYL,(16))
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=A
//SORTWK01 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK02 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK03 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK04 DD UNIT=DISK,SPACE=(CYL,(6))
//SORTWK05 DD UNIT=DISK,SPACE=(CYL,(6))
//SYSIN DD DSN=H03AEHS.TEST.CNTLLIB(TESTCNTL),DISP=SHR
//**********************************************************************
//*TEST RUN FOR THE GEENRATION OF COMPLETED ORDERS
//STEPPROG EXEC PGM=TESTPROG,PARM=DUMMYGENSA,REGION=2048K
//STEPLIB DD DSN=LLS1.TESTLIB,DISP=SHR
// DD DSN=TISXA.PCH5SUP.INTERFLM,DISP=SHR
// DD DSN=TISXA.PCH5SUP.LINKLIB,DISP=SHR
// DD DSN=TISXA.PCH5SUP.ENVLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSU2UMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
//PDMSNAP DD SYSOUT=*
//CSIPARM DD DSN=OM60.PROD.CTLCDLIB(OM60PRDS),DISP=SHR *DESC SUPRA
//OM60TST1 DD DSN=OM60CD.TEST.OUTPUT,DISP=SHR *I/P OODV FILE
//OUTFILE1 DD DSN=OM60CD.TEST.OUTFILE3,DISP=OLD *O/P OODV FILE
//

SAMPLE OF HOW TO NAVIGATE A CHAIN USING FORWARD AND BACKWARD


POINTERS USING OODV VARIABLE FILE :

FORWARD:

MOVE SPACES TO OODV-IOAREA.


MOVE READV TO OODV-FUNC. ( READING THE CHAIN IN FWD PATH)
MOVE LKXX TO REFER.
COMMENT  TO START NAVIGATING FROM THE BEGINNING OF THE CHAIN
MOVE ORDER-NUMBER TO OODV-ORD-NO. (CONTROL KEY IS SET)
MOVE ‘****’ TO STATUS.
PERFORM OODV-IO UNITL REFER = ‘END.’.

OODV-IO.

CALL ‘DATBAS’ USING OODV-FUNC STATUS OODV REFER ORDMLKOO OODV-ORD-NO


OODV-LIST OODV-IOAREA END.
IF STATUS = ‘****’
DISPLAY ‘ ORDER NUMBER ‘ OODV-ORD-NO.
DISPLAY ‘ AT POSITION ‘ REFER.
ELSE
IF STATUS = ‘END.’
DISPLAY ‘ END OF THE CHAIN IS REACHED ‘
ELSE
DISPLAY ‘ SUPRA ERROR FOR OODV FILE ‘ STATUS
END-IF
END-IF.

IO3-SOTS Page 15 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

BACKWARD:

MOVE SPACES TO OODV-IOAREA.


MOVE READR TO OODV-FUNC. ( READING THE CHAIN IN REVERSE)
MOVE LKXX TO REFER.
COMMENT  TO START NAVIGATING FROM THE BEGINNING OF THE CHAIN
MOVE ORDER-NUMBER TO OODV-ORD-NO. (CONTROL KEY IS SET)
MOVE ‘****’ TO STATUS.
PERFORM OODV-IO UNITL REFER = ‘END.’.

OODV-IO.

CALL ‘DATBAS’ USING OODV-FUNC STATUS OODV REFER ORDMLKOO OODV-ORD-NO


OODV-LIST OODV-IOAREA END.
IF STATUS = ‘****’
DISPLAY ‘ ORDER NUMBER ‘ OODV-ORD-NO.
DISPLAY ‘ AT POSITION ‘ REFER.
ELSE
IF STATUS = ‘END.’
DISPLAY ‘ END OF THE CHAIN IS REACHED ‘
ELSE
DISPLAY ‘ SUPRA ERROR FOR OODV FILE ‘ STATUS
END-IF
END-IF.

IO3-SOTS Page 16 8/24/2020


TOTAL DML COMMANDS DESCRIPTION
AUTHOR : HARI SHANKAR

QA:

1. How do we handle the task/file initiation for a COBOL module with SUPRA calls for update?

Ans. In the SINON command the access method has to be UPDATE.The REALM mode in the SINON
option has to be SUPD.

2. What are the causes for the status NOTO? ( We got this error quite often initially)

Ans. NOTO status occurs for the following reasons :

a) The TOTAL/SUPRA region is down.If the region is down in test confim with the other team members
if they had brought the region down for their testing.If not the OCS/SS team might be testing (we share
the same testing regions with them). Coordinate with them as to when we can bring the region up.
b) If you are accessing the production files make sure you login from TSOH2;else NOTO status will
occur.
c) If you are accessing the test region check if your run JCL has the line /*RESOURCE SYSTEM3 in the
job card for production it should be /*RESOURCE SOTS.

3. Do we have access to production DB files and can we update them?

Ans. All our ID’s have access to production files and we can update them.So it is very important that we
ensure that we check and recheck that we are only aceesing the test region and do not touch the production
database.

4. How do we bring the SUPRA region up in test?

Ans. We need to run a CLIST SUPRATA ( for CISCDCHA region) or SUPRATD ( for CICSDCHD
region). The authorization is available for only H03AEVK id to run the CLIST.

5. What are the files that get updated in the different regions?

Ans. The data from the production will be reflected in the files OM60.XXXX.
The data from CICSDCHA will be reflected in the files OM60.XXXXT1.
The data from CICSDCHA will be reflected in the files OM60.XXXXT6.

XXXX- File Names.

Some exercises which will give a better hold on programming :

1. How to walk thru’ a chain of variable records from the beginning of the chain to the end ?
2. How do we delete a master record?
3. How do we relink a variable record from a master record to another?
4. How to store a variable record which has to master records?
5. How to store coded variable records?
6. How do we modify the record code for the coded variable records?

IO3-SOTS Page 17 8/24/2020

You might also like