0% found this document useful (0 votes)
56 views

Hyd Stage 1 Question

1. The document provides instructions for two assessment activities involving JCL and VSAM. 2. Activity 1 requires creating a PS dataset and entering records. Activity 2 involves writing JCL to sort the records using utilities, with output stored in multiple PS files. 3. The JCL is to include steps for deleting/allocating output datasets using an instream procedure, sorting the original file in ascending order and removing records, extracting a range of records, and rearranging field positions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views

Hyd Stage 1 Question

1. The document provides instructions for two assessment activities involving JCL and VSAM. 2. Activity 1 requires creating a PS dataset and entering records. Activity 2 involves writing JCL to sort the records using utilities, with output stored in multiple PS files. 3. The JCL is to include steps for deleting/allocating output datasets using an instream procedure, sorting the original file in ascending order and removing records, extracting a range of records, and rearranging field positions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ASSESSMENT02 (JCL & VSAM)

lnstn1C1ion :
le in
1.if you are using TLAB..., Sample compile and run JCL is availab
go rn view mode and copy the members to your
"TLABADM.LAB.SYS.COMPRU~ Please
delive rable dataset
the Port is 623 to connect to
2. if you are usmg TLAB"!.the IP address ,s 10.142.149.210 and
Mainframe Terminal
;iition e'l CC/MOCK/JCT
Ple3se do not EVALUAlE ;iind just SUBMIT the code for Ev;iilu
usess ment s.

Activity 1: Using ISPF


tton as given below.
Allocate a PS dataset with record length 80 with naming conven
PS1 - <USERID>. •JCLASSMI 02.S1.lARE..es1
LASSMT02.SHARE.PS1 •
Enter the records given below in the PS datasel PS1= <USERID>.JC
PS1 tile
• 1st row contains the header details, which bij~JQ be entered in
• DO NOT ENTER ROW2 as it contain s layout details.
• Insert one space(filler) between each field.
• Enter all the records in capital letters.

SHARE_PRICE
X(S) 9(3)
- -
~RE _ID NO OF SHARES COMPANY_NAME
X(20) 9(3).9(2)
020 ABC INFO TECH 129. 25
SH0 l0
Editor SuaQestions: Showing I
J
I
..... --
- -
_....._~------- ~ ----- - · - .. ·-- ·-. --- ·-

-
...
1st row contains the header details, which b~v.,t:!_tg be entered in PS 1 file
I -

• 00 NOT ENTER ROW2 as it contains layout details.


• Insert one space(filler) between each field.
• Enter all the records in capital letters.

SHARE_ID NO_OF_SHARES COMPANY_NAME SHARE_PRICE


X(S) 9(3) X(20) 9(3).9(2)
SH010 020 ABC INFO TECH ·- 129.25
SH090 025 APPLE INFO 156.90
SH020 050 ORANGE INFO SYSTEMS 100.00
SH02@ 056 SQUARE SYSTEMS 132.37
SH011 034 CUBE TECHNOLOGIES 145.89
SH019 045 ECHO SYSTEMS 111.11
SH01# 035 MATRIX SOLUTIONS 123.23
SH022 020 X SYSTEM SOLUTIONS 145.35
SH036 035 I CLOUD SOLUTIONS 111.25
SH045 010 TNT SYSTEMS 154.45

Activity ~ SORT USING JCL


~ Allocate a PDS :SUS~ CLASSMI0.2.Sl:IARE using ISPF and create a member
1--i JCL01 and write a JCL to perform the given task.
• Create an instream procedure tor deleting and allocating the PS output datasets
• Name the instream proc as DSCRT which contains STEP001 & STEP002.
I •..,
Ac tiv ity ~ SORT USING JCL
• Allo cate a PD S <USERIQ>.JC\ £§5MJQ
JCL01 and wnt e a JCL to per form the
2,SHARE using ISPF and create a member
given task .
• Cre ate an inst rea m procedure for dele
ting and allocating the PS output datasets
• Nam e the instream pro c as DS CR T whi
STEP001 : ch contains STE P001 & STEP002.
• Thi s Ste p sho uld be PR E Qfl FIE ot
output datasets - PS? PS3 PS1 P$5 P$6
• Dec lare the valu e for DS N as sym boli
c parameter &DSNAME
• Val ue fnr B,O SNA ME sho uld be USER1D
.JC LAS SM T02 SHARE
0 f irampJe,_,; OSN : &QSNNAME ,.PS 2
S TEP002:
• Thi s Ste p sho uld be allocation of output
dataSPtS• P§? esa P$4 PS_§ P56

• Dec lare the valu e for DS N as symboli


c parameter &DSNAME
• Val ue ~ OS NAM E should be USERID.JCLASSM
T.02 .SHARE
o Exampl e,,: DS N: &QS NN AM E PS2
STEP003:
I"- This Step should call the_instream procedure DSC · · 1 rt
14 allocation of abgye roeoflooed PS dat
RT whi ch wil pe onn del etJon
·
a
nd
asets.
STEP01 0:
• Usi ng Sor t utility perform the give n ope .
ratiOns on PSJ .. . .
:;J,JSEBID> ,JCI AS SM I02 SH AR E PS1 and
store the output m PS2
)ns: On Editor Su gge stio ns: Showing -I
• Dedare the value for DSN as symbolic parameter &DSNAME
•Value ~ $NAME should be USERID.JCLASSMT02 Sl;IARE
o Example..: DSN=&DSNNAMF ,PS2
STEP003:
• This Step should call the instream procedure DSCRT which ~II perform deletion and
allocation or above roentipnPd PS datasets.
STEP010:
• Using Sort utility perform the given operations on PSJ..
sJ /SERfQ> !Cl .QSSMJQ?_Sti~BE e~
and store the output in PS2
<U$EBIQ> t!GI 8$$MJP2 $HARE f§2
• Sort records in ascending order based on SHARE.JD and
NO_OF_SHARES and remove the header record.
• Remove the records which have SHARE_ID that has characters (@#)
STEP020:
• Using Sort utility perform the given operations on PS~
5U,§E8!D> !QI A5SMJQ2sS!;!ARE PS? and store the output in PS3
<U§ERIQ> 1CJ A§§MJP2 §HARE .PS3 ' . ,
• Extract 6 records from 2nd record into output fite. If file contains 8 records
after sorting,·this step should extract 2nd to 7th record
STEP030:
• Using Sort utility perform the given operations on PS~
<I fSFBJD> IC! ASSMIQ2,SHARf PS? and s)or~ the output In PS4
<I /SfBl!l?. (Cl ASSMI Q2 S!:Jru3,E .PS4 , ' . .
• Rearrange the position of the fields as specified in the below
layout The output of the sorted records should be stored into the
PS4 file ,'

~
STEP040:
• Using Sort utility perform the given operations on PS2..
<I ($ FB!D> '!l_ ttSMI02 5H88E P$2 and store th~ output in PSS
.5USERIQ>.JC SMJ02.SHA8E .P.S5,. -" ...,. _
~xt Predictions: On Editor Suggestions: Showing
............---ft-· 1•--+-l -·--
I
S1EP040:
. ,,
• Using Sort utility, pe.rfonn the given operations on PS?.,.
~I 1$ER)Q> ,ICI ASSMI Q2 Sl:;IABE PS2 and store the output in PSS
<l)SfBIQ>.1c1 AS§MJP2 §HARF PS~
• Copy the records
• Insert the header in the output file PSS in the 12th Position as below.
"-•sHARf DETAIi s ...
Insert a trailer in the output file PSS in the 2nd position with the Total number of shares.
For example, if the PSS file has a total number of shares of 250, then the trailer record should be
as below, starting from position 2, so TOTAL NUMBER OF SHARES: 0250
S1EP050:
• Using Sort utility, perfonn the given operations on PSZ.,
sUSERID> .IGI ASSMI02_Sl;IABE PS2 and store the output 1n PS6
s.LISEijlQ>,ICLASSMI02,.S~ .PS6
· • Replace all the character 'A' in COMPANY_Nj\ME lo '@'
For example, COMPANY NAMf · ABC INFO TECH ti~s_tg be replaced by @BC INFO JECH
SQUARE SYSTEMS to SQU@RE SYSTEMS
Activity ~ VS~M
• Write a procedure :,.USERJDu CL.MYeROC(KSDSCRT) to allocate a KSOS dataset
with the following specifications,
RECOROSIZE (80, 80)
KEYS - SHARE_ID (~ 5))
Name: KSOS = <\J§EBIQ> JQI ASSMJO? SHAREKSDS
Create a control card (MYCTL01) for the abOve procedure and store it
in <U$fBID?.,JCLMYeROC. .
NOTE: IN lHE CODE EDITOR DO NOT START CONTROL CARD STAlEMENTS IN
COLUMN 1
r"\'vU • I ILJ ~ • -.H"'V'l'I

• Wnte a procedure <USERIQ> JCL MYeROCIKSDSCRT) to allocate a KSDS dataset


with the rollowmg spec1f1cations,
RECORDSIZE (80, 80)
KEYS - SHARE_ID (~ 5))
Name. KSDS = <l/$f BIP> ,!Cl ASSMJQ2 SHARf.KSDS
Create a control card (MYCTL01) for the above procedure and store it
in $USfB1Q> ,tCL,MXfBQG .
NOTE: IN lHE CODE EDITOR DO NOT START CONTROL CARD STATEMENTS IN
COLUMN1

Create a member JCL02 in the PDS <U§ERIQ> ,ICL A§§MIP? SHARE and write a JCL to
perform the below mentioned task.
S1EP010:
• Call the procedure KSDSCElT. aart allocate a dataset
• <USERIQ> .1c1 A§$MJ92 §HARf KSDS
S,e:P020:
J.. Check if the PS2 file is Empty or not
• If Not Empty, In STEP030 Load KSDS file with data from PS2.Else in S1EP040d,splay
"Dataset is Empty" in the Spoof.
S1EP050:
• Write a JCL to create an Alternate 1pgey <ll§fRIQ> ,!Cl A§§MJP2 §HARE e,x tor
ns: On Editor Suggestions: Showing I
_,., . a lltt! fflb er JCLO
per formlhe bel
ST EP 010: ~ '" the PO
- - - •-
ow me ntio ned task S < USl =R1 n,. .IC.I A5 s1,,rro2 SHA
. =:: V I Ji,,
-· .
--- -- - -BE :ind WTi
v I J) I
v
te a JCL 10
• can the pro ced ure K§ps
<U§fBIQ> ,!Cl AS SM T02cer a..,
• .
- allocate a dataset
SlE P0 20: · - - - - - §HABf !(SOS

Ch eck if the PS 2 file IS Em ply or
• not
If No t Em pty in STEP030 L d KS
"Dataset i s Em pty • ,n the Spooa I .0S
STEP050: file Wllh dala from PS:! Else In SlE
o P040d~ ni- .
• ~osc:t~~.D~~:;u:~emale
CO MP AN Y NA ME ~ IQdex <l/$EBIQ,. ,ICJ A.5
) MfC RS ..HA RE.KS 0S). The Alte ShUP2 §HABf
,..._,
AlX fl')f
~T EP 060: - .
rnate key is
• De fine the BLDINOE.X f0< the Alte
ST EP 070: rna te Index
'
• ~fi ne the Pa th. $,JSl;BIP" JCL
Ev alu atio n Pro c.d ure :
,ASSMI02 §HARE PATH
• Ma ke sur e you hav e cod ed all
the
nam e as per the req uire ment me d a t a s e t ~ ~ card name and step
ntioned.
• Do wn loa d you r inp ut PS dat ase
t from (JC LAS SM T02 SH AR E PS
nam e the file as SH AR EIN P.tx 1) to your system and
t
• Down loa d you r pro ced ure KS DS
CRT to you r sys tem and name the
• Down loa d you r con trol can LM file as KSDSCRT.tx t
)'.C il01 to you r system and name the
and make !>Ure the CONT RO L CA RO STA TEM tile as MYCTL01.t
EN TS DOES NOT STA RT IN COLUM xl
1. N
• Do wn loa d you r JCL CO DE from
sys tem and nam e the file as ~
I I.~Pl o
£s
<USERID> ASSMI02(JCL01.JGL02) to you
Jct r
Drag the file s (SHARE!Nf.Jxt,KSD.S
CRT txt,MY,CTI.OJ nct.JCLO,Ltxt,JCL02.txt) into the
cod e edr tor.
Th en Pre ss E val uat e but ton for
Eva lua tion .

You might also like