cics trianing class 08
TRANSCRIPT
-
7/21/2019 Cics Trianing Class 08
1/17
www.mainframes-online-training.weebly.com Polsani Anil Kumar
FILE HANDLING
CICS Training Class-08
http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/ -
7/21/2019 Cics Trianing Class 08
2/17
Types of VSAM Cluser
Types of VSAM datasets used in CICS are
!ntry Se"uenced #ataset $!S#S% &'A S!()M
Key Se"uenced #ataset $KS#S% K!* S!()M
&elati+e &ecord #ataset $&S% &&, S!()M
DTATSET TYPE ACCESSED USING ACCESS MODE
-
7/21/2019 Cics Trianing Class 08
3/17
Ser!i"es #ro!i$e$ %y CICS
'asic peration &e"uired or A ile Are
Adding A &ecord
Modifying A !/isting &ecord
#eleting A !/isting &ecord
'rowsing ne r All &ecords
&eading A &ecord
Addition CICS Pro+ides
!/clusi+e Control n &ecord 0e+el
pening And Closing
1ournaling
-
7/21/2019 Cics Trianing Class 08
4/17
De&ning A File To CICS
ile s2ould be defined in CT $ ile Control Table%
CT will contain all t2e information about a file $ 0i3e dataset name 4
access met2ods4 permissions etc.%
#efining file can be done eit2er by C!#A transition or #5CTmacro
C!#A #! I0!$I0!-,AM!% 6$6-,AM!%
C!#A I,S I0!$I0!-,AM!% 6$6-,AM!%
-
7/21/2019 Cics Trianing Class 08
5/17
File Han$ling In #rogra'
ile s2ould not be defined in program
Program s2ould not open or close a file
&ecords can be inserted updated or deleted
-
7/21/2019 Cics Trianing Class 08
6/17
Se(uenial )ea$
Se"uential read is done by 'rowse peration
!stablis2ed t2e pointer to t2e first record to read using
STA&T'&
,e/t and pre+ious records can be read as re"uired using
&!A#,!7T and &!A#P&!V.
!nd t2e browse operation at last 8sing !,#'&
'rowse can be re-positioned 8SI,6 &!S!T'&
#uring browse operation records cannot be updated
-
7/21/2019 Cics Trianing Class 08
7/17
STA)T%) Co''an$
EXEC CICS STARTBR
FILE(FILENAME)
RIDFLD(DATA-AREA)
END-EXEC.
Condition #ISA'0!# 4 I!&& 4 ,T,#4 ,TP!,
-
7/21/2019 Cics Trianing Class 08
8/17
)EADING AFTE) STA)T%)
Se"uentially T2e ,e/t And Pre+ious &ecord Can 'e &ead 'y A
&!A#,!7T r &!A#P&!V
T2e irst &!A#,!7T r &!A#P&!V 9ill &ead T2e &ecord92ere T2e STA&T'& 5as Positioned T2e ile Pointer
&!A#,!7T ollowed 'y &!A#P&!V r Vice Versa peration
9ill Always &ead T2e Same &ecord
-
7/21/2019 Cics Trianing Class 08
9/17
)EADNE*T+ )EAD#)EV
EXEC CICS READNEXT | READPREV
FILE(NAME)
INTO(DATA-AREA)RIDFLD(DATA-AREA)
END-EXEC.
Conditions #8PK!* !,#I0! I!&& 0!,6!&& ,T,#
-
7/21/2019 Cics Trianing Class 08
10/17
END%),SE
-
7/21/2019 Cics Trianing Class 08
11/17
)ESET%)
-
7/21/2019 Cics Trianing Class 08
12/17
)EAD Co''an$
-
7/21/2019 Cics Trianing Class 08
13/17
)ITE Co''an$
-
7/21/2019 Cics Trianing Class 08
14/17
-
7/21/2019 Cics Trianing Class 08
15/17
Delee Co''an$
#elete;s a record from t2e file
&ecord can be deleted in two ways
&andomly wit2 &I#0# 2a+ing full 3ey
&ecord read wit2 8P#AT! command one by one
Multiple records can be deleted by pro+iding 6eneric option
EXEC CICS DELETE
FILE(FILE NAME)RIDFLD(DATA-AREA)
END-EXEC
Conditions #ISA'0!#. I!&&4 ,TP!,4 ,T,#
-
7/21/2019 Cics Trianing Class 08
16/17
.NL,C/ Co''an$
T &!0!AS! t2e record w2ic2 2as been loc3ed by read wit2
8P#AT! command
Synta/
EXEC CICS UNLOC
FILE(FILENAME)
END-EXEC.
Conditions I!&&4 I,V&!(
-
7/21/2019 Cics Trianing Class 08
17/17www mainframes online training weebly com Polsani Anil Kumar
Tan1 2ou
Po!s"ni Ani! #$"%
http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/http://www.mainframes-online-training.weebly.com/