We are using 2 files , file one has data, file two is
empty.Using jcl how can we find the other file is empty?
Answers were Sorted based on User's Feedback
Answer / mchava
using IDCAMS utitlity
Print infile(file name) count(1)
it will check whether the file is empty or not
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / sundar
Using IDCAMS utility
In SYSIN:
PRINT(infile) COUNT(1)
If this step return 4 then the file is empty otherwise if
return 0 then the file is not empty.
Is This Answer Correct ? | 10 Yes | 0 No |
Answer / sham
using idcams and its command print we can find wheather the
fiel is empty or not
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / raghu
This can be done using ICETOOL.
//STEP1 EXEC PGM=ICETOOL
//IN DD DSN=……input file1
//TOOLMSGDD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD*
COUNT FROM(IN) EMPTY
/*
In the above JCL, Input file1 is empty. If we run this JCL
it will retrun NON-ZERO retrun code.
adv: It will be very helpful when we want to run some steps
after checking a particular file is empty or not.
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / bala
Compare the file with another known empty file. IEBCOMPR
comparison of two empty files should give non empty RC.
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / vinay sonar
Print the contents of file using IDCAMS utility if it is
empty you will get MAXCC 4
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rajesh_m13
stepname exec vsamempt=yes
that shows empty file
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / deepak dada, jaipur
the handling would happen
if the file is empty then pass the zero to return code in
cobol program
then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / deepak dada, jaipur
the handling would happen
if the file is empty then pass the zero to return code in
cobol program
then go to jcl step and check for the conditiom code( 0,
eq) where the program is getting called and do whatever you
want to do
Is This Answer Correct ? | 0 Yes | 5 No |
diff bw vsam and normal flat file?
Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat files (I have GDG base: FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot using a JCL. May be by using IEBGENER. It's a bit urgent. So anyone's fast rely would be appreciated.. Thanks in advance.. 10 flat files ----------------------------------- FDWS01.SUB.RESTORE1 FDWS01.SUB.RESTORE2 FDWS01.SUB.RESTORE3 ; ; FDWS01.SUB.RESTORE10 TO GDG versions ----------------------- FDWS01.TEST.RESTORE.G0001V00 FDWS01.TEST.RESTORE.G0002V00 FDWS01.TEST.RESTORE.G0003V00 ; ; FDWS01.TEST.RESTORE.G0010V00
What is the differentiation between TRK,cyl, and Bytes... how they can be connected??
what are the ways of passing data to a cobol program from jcl?
What is a COND parameter in JCL?
What it does If we specify TYPRUN=P & it is not substituted by SCAN 0r HOLD in VALUE SET.
Please go thru the below points and let me know how to code this. 1. Sort the input dataset for the condition : Starting position is 37,length of the field is 13 based on character and in the ascending order , starting from position 25 length of 12 ,character and in the ascending order. Use a temporary dataset to hold the sorted file. 2. Use the temporary file created in the above step as the input for the next step. The next step is to execute a program and produce an output file. Use the temporary file created in the above as work file 1 and the output of the file to be created in this step work file 2.Also, pass a parameter to the program that is to be executed in this step. The parameter should have the current date in YYYYMMDD format. For the sake of convenience, you can use the below Job Name : Sample1 Input DSN : PCABDT11.CABD.TEST.INPUT Temporary DSN : Sort1 Output DSN : PCABDT11.CABD.TEST.OUTPUT Program Name : SAMPLE Thanks in Advance for your response.
what is force complete
What do you feel makes a good program?
Suppose we have 5 steps in a job.No step should be executed After submitting every step in a job
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
What is the difference between the positional and keyword parameters? Give examples.