View previous topic :: View next topic
|
Author |
Message |
Gangaraju
New User
Joined: 15 Dec 2005 Posts: 6
|
|
|
|
Hi, these are my questions asked in a Covansys interview:
1. How to create a PDS through JCL.
2. Can you edit the key in KSDS.
3. How to pass the parm parameter in cataloged procedure.
4. In GDG what is the main difference between EMPTY and NOEMPTY.
Thanks,
G.Raju |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi ,
Quote: |
1. How to create a PDS through JCL. |
Code: |
//JOB
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=DSNNAME,SPACE=(TRK,(1,1,1)),UNIT=SYSDA,
// DCB=(DSORG=PO,LRECL=80,RECFM=FB,BLKSIZE=800)
// DISP=(NEW,CATLG,DELETE)
// |
Quote: |
2. Can you edit the key in KSDS. |
I don't think so.. you should drop the file and should create the file again.
Quote: |
3. How to pass the parm parameter in cataloged procedure |
USE PARAM keyword.
Quote: |
4. In GDG what the main difference between EMPTY and NOEMPTY |
NOEMPTY is used such that uncataloging oldest generation of a GDG once the limit is reached. |
|
Back to top |
|
|
i413678 Currently Banned Active User
Joined: 19 Feb 2005 Posts: 112 Location: chennai
|
|
|
|
Hi,
I think NOEMPTY uncatalogs the oldest generation and EMPTY uncatalogs all the generations whever limit exceeds.
correct me if I am wrong.
one more doubt khmarutheens reply......is it PARAM or PARM.
pavan |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
1) I agree w/KAK
2) Copy the rec to the correct pos in the file based on the new key value, then change the key to the new key value. Delete the orig rec.
3) Usually you specify it as a symbolic (E.G. PARM=&MYPARM) in the proc, then at execution, code:
// EXEC PROC=MYPROC, MYPARM=ABC
4) I agree w/I413678 |
|
Back to top |
|
|
sudheer_kumar
New User
Joined: 27 Dec 2005 Posts: 16
|
|
|
|
Hi friends,
Another possible solution for Question1:
Use the IEBGENER utility as shown below:
Code: |
//STEP040 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSUT2 DD DSN=File_Name,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(2,2),RLSE),
// DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PS)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
|
|
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Sudheer.
The advantage that KAK's solution has over yours is that IEFBR14 uses only a few Assembler insructions to execute (it was only 1 at one time).
Gener will execute all its initializing code open and close both the IP & OP files, issue msgs, etc.
If it creates a file that can be read successfully even if it's empty, then it may be worth the overhead.
Does it?
Thanx and |
|
Back to top |
|
|
vinodmaanju
New User
Joined: 10 May 2005 Posts: 28 Location: Pune
|
|
|
|
HI,
1. Using IEFBR14 utility we can create.
2. Yes if you r talking about key length and offset than we can edit it with ALTER command using IDCAMS utility.
3 There are two ways to pass value in cataloged procedure 1. using overriding Example:
//step exec proc=procname,parm.stepname= value ( if u dont specify stepname with PARM then it will be applicable all steps in procedure.
2. using Symbolic Name ---- agree with MMWIFE
4. I agree with I413678 |
|
Back to top |
|
|
|