You are on page 1of 6

How do you access a file that had a disposition of KEEP?

Need to supply Volume Serial Number VOL=SER=xxxx. If KEEP declared in normal disposition. Permanent data set is to be kept on the volume serial number when job is executed in successful execution. If Keep declared in abnormal disposition. Permanent data set is to be kept on the volume serial number when job is executed in unsuccessful execution.
How to execute 300 steps in a Job? Ans : A job can execute only 255 steps, so we cant do it in either indirectly
Can I concatenate various datasets whose organization are different from each other. Lets say I want to cancatenate a PDS file, a PS file, a GDG file etc. Can You do that ?? If yes, how ? is there any separate Utility to do so ???

Nope, we cant
i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?

In the question it says that in step 4 and 5 a new generation is created. so Step 4 output: XX17.PRASAD.OUT1(+1) This step can be referred as in Step6. so step 6 will refer this file as XX17.PRASAD.OUT1(+1) generation only. because (+1) will become current version (0) only after the execution of the entire job. Similarly Step 5 output: XX17.PRASAD.OUT2(+1) so step 7 will refer this file as XX17.PRASAD.OUT2(+1). If the job abends in step 6. the files created in step 4 and 5 will become current version (0). so now the 7th step will refer the output of step 5 as (0) i.e.XX17.PRASAD.OUT2(0). Note: I assume the files created by step4 and step5 are different.

Can I copy the FB (fixed Block) record length

file to a VB

(variable Block)record length file and Vise Versa? If Yes then how ? is that thru one of the JCL utility ?

Yes. using IEBGENER utility we can copy this. But this is not advisable until there's a specific requirement. FB to VB -------FB rec length is X VB rec length should be X+4 VB to FB -------VB rec length is X (Length indicated in JCL) FB rec length is X-4 Note: But here in second case lot disk space will be wasted. Use syncsort utility. for FB to VB OPTION COPY OUTFIL BUILD=(5,1000),FTOV,VLTRIM=X'40' simililarly for Vb to FB OPTION COPY OUTREC FIELDS=(1:5,4034),CONVERT
I have one GDG. Everyday One new version is being created.Now split this created version in different files 1000 records. Here Problem is I don't know How many records in new version of GDG? that's why I don't know How many Out files we Interesting?????????????? I want to each having will be there need to use .

Write a Clist that will take the input file read the first 1000 records and create an output file. After 1000 records are created the next record should be written to a new file. The Clist can allocate files during execution. The timing of the file allocation will be handled logically by the program. Keep a counter, once it reaches 1000, initialize the variable and and create a new file.

The output file names will vary with each file. Execute the Clist as a step in your job and once the step completes the output should be different files with 1000 records.
A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code?

The condition code can be nullified by using the following command. //STEP001 EXEC procname, COND.stepname=(0,LE)
A file has dta in S9(09) COMP format. How do I move the data into a character field X(10)?

COMP is a binary format, if you directly redefines, it won't give proper value. So, move S9(09) COMP to s9(09) Numeric field, then Redefine this field with Alphanumeric.
File1 has 100 records and file2 has 200 records i want to copy 50 records which r in both file into file3

First need to sort both files READ FILE1 READ FILE2 PERFORM UNTIL EOF = 'Y' IF FILE1-ID > FILE2-ID THEN READ FILE2 AT END MOVE 'Y' TO ELSE IF FILE1-ID < FILE2-ID READ FILE1 AT END MOVE 'Y' TO ELSE IF FILE1-ID = FILE2-ID WRITE FILE3 READ FILE1 AT END MOVE 'Y' TO READ FILE2 AT END MOVE 'Y' TO END-PERFORM
My JOB contains three steps. //STEP1 EXEC PGM=ABC //STEP2 EXEC PGM=DEF //STEP3 EXEC PGM=GHI

EOF EOF EOF EOF

My Question is 1) I want to execute second step only. How will do. 2) Soppose U consider above three steps are in PROC steps

and I want execute the PROC second step only? How to execute the second step only. During exection time its creating any ABEND?

Question no.1 ------------Code RESTART=STEP02,COND=(0,LE) in the job card Question no.2 ------------Code RESTART=PSTEP1.STEP02,COND=(0,LE) in the job card.PSTEP1 is the step executing PROC.
If i have defined an temperory dataset in step2, how can i call back or use the same dataset in step5 of the same job

With the help of referback we can do so , the syntax is //ddname dd dsn=*.stepname.ddname


Can we write same stepname for one or more steps in on job ?

Yes. We can code same step name for another step. The job

gets executed successfully. A warning alone comes.


How does -818 sql error occur? Why does it happen and what can be done to overcome this error code?

IT is a TIMESTAMP error.. When loadmodule and plan are out of sync then this error'l be occures.
do the Precompilation again to overcome Timestamp mismatch(-818 error),bcz Timestamp is allocated at Precompilation time only. i have a ps with two columns eno and ename , i need to copy eno column values in one ps and ename column values in one Ps ? is it possible through iebgener . how ? thx in advance

//job card //step1 exec pgm=IEBGENER //SYSUT1 DD DSN=SOURSE, DISP= SHR //SYSUT2 DD DSN=ENODATASET , DISP=SHR //SYSIN DD * PRINT MAXFLDS=1 RECORD FIELD=("ENO COL LENGHT", 1, , 1) //STEP2 EXEC PGM=IEBGENER //SYSUT1 DD DSN=SORSES, DISP=SHR //SYSUT2 DD DSN=ENAMEDATASET, DISP=SHR //SYSIN DD *

PRINT MAXFLDS=1 RECORD FIELD=(ENAME LEGTH,STARIN POS, , 1)


suppose i have 10 job steps and i want to execute only step 6.How to write?

for steps1-5 code cond=(0,LE) and after step06 put a // (null).It will automatically stop execution when it finds a null. code restart=step6, cond=(0,le) in job card and only step6 will be executed
i created one base gdg with lrecl = 100 , now i need to create versions with different lrecl =150,200 can it be possible to create like tht ?

GDG Base is not associated with the record length. So the versions can have different record length. For example version 1 can have 150 and version 2 can have 200 as record length.
BY SEEING THE FILE ITSELF HOW CAN WE IDENTIFY WHETHER IT IS A VSAM FILE OR FLAT FILE

just do a 's'(data set information) in front of the file name. Data class will have 'VSAM'. Also in 3.4, the volume column will have 'VSAM'.
1. delete is not possible in esds. why? 2. i have 10 records in a esds file and i want to delete only 1st record ..then what i have to do?.. it will not affect any sequence of the RBA. 3. why open extend is not possible in rrds vsam file?

1) The ESDS organization will not allow you to delete the record. 2) Using FileAid, copy first 09 record into other data set. Which means that the new file contains only 9 records(10th record is deleted0 3) Hope that you can use EXTEND
when u r using repro command what happens if both infile and outfile names same

if with repro command indataset and outdataset name are same then it will be excuted successfully...and the data in

the dataset will be remain same.


How do you convert flat files to VSAM files ?

u can not directly convert a flat file to vsam file because vasam file have something called key filed which u need to specify and it should be in some order asc/dsc or we can say sorted on key filed and then we can copy the flat file to vsam file

You might also like