How to identify where file is empty or not? How many ways are
there to identifying?
Answer Posted / fred
There are so many ways this can be done.
DFSORT/SYNCSORT
ICETOOL/SYNCTOOL
IDCAMS
FILEAID/FILEMANAGER
IEBPTPCH
ISRSUPC
EASYTRIEVE
Using REXX checking with EXECIO / LISTDSI
Using SORT is the easiest:
//jobcard
//S010 EXEC PGM=SORT,PARM='NULLOUT=RC4'
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=<datasetname>
//SORTOUT DD DUMMY
//SYSIN DD *
SORT FIELDS=COPY
/*
-- RC 4 if Empty
RC 0 if there is data.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
How can return codes be tested before execution of a job step?
What is the motivation behind coding class parameter in job statement?
how do you access an uncataloged dataset in a jcl?
How to pass the parameter in parm using linkage section ? (syntax)?
What is jcl in mainframe?
Is condition checking possible in jcl? If yes, how?
I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK
What is the function of a dd statement?
how to run batch program without jcl?
What is the purpose of dd * statement in jcl?
What are s0c1, s0c4, s0c5, s0c7 and socb?
How dummy is used in jcl?
How does jcl specify the job to the operating system?
What is the significance of addrspc parameter in the exec statement?