Page 1 of 1

Selecting all PS with LRECL=925

PostPosted: Tue Sep 14, 2010 1:21 pm
by nm992
Hi,

I need to search for a particular field in all files which has LRECL=925.Can i search with HLQ where all PS have LRECL=925.

I used IDCAMS to get all PS with a particular HLQ intoa PS file.Can i put a comdition somewhere related to LRECL?

//LISTDS EXEC PGM=IDCAMS
//SYSIN DD *
LISTC LVL('HLQ')
/*

Re: Selecting all PS with LRECL=925

PostPosted: Tue Sep 14, 2010 11:53 pm
by dick scherrer
Hello,

Not directly - that i'm aware of.

Re: Selecting all PS with LRECL=925

PostPosted: Wed Sep 15, 2010 1:02 am
by MrSpock
How about this?

Use IDCAMS with the LISTCAT command, as you've shown, to list all of the matching datasets.

Run the LISTCAT output through a SORT step to filter out every record with 'NONVSAM ----- DATASET' and create a series of TSO LISTDS commands, i.e. 'LISTDS 'DATASET.NAME'.

Run a batch TSO step and process the LISTDS commands.

Run another SORT step to filter out only the datasets with a value of '925' shown under the '-LRECL-' column.

Re: Selecting all PS with LRECL=925

PostPosted: Wed Sep 15, 2010 2:34 pm
by nm992
Hi,

Can you please guide me how to use LISTDS command

Iused below code..
//LISTDS EXEC PGM=IDCAMS
//SYSIN DD *
'LISTDS 'HLQ.TEST.JCLLIB'

/*

I got error as
CAY6006S VERB "LISTDS" IS UNKNOWN

Re: Selecting all PS with LRECL=925

PostPosted: Wed Sep 15, 2010 3:10 pm
by MrSpock
//LISTDS EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=...
//SYSTSIN DD *
LISTDS 'HLQ.DATASET1'
LISTDS 'HLQ.DATASET2'
.....
/*
//*

Re: Selecting all PS with LRECL=925

PostPosted: Wed Sep 15, 2010 6:30 pm
by shyamsaravan
//LISTDS EXEC PGM=IKJEFT01                         
//SYSTSPRT DD DSN=OUT.DATASET,               
//            DISP=(,CATLG,DELETE),             
//            SPACE=(CYL,(40,5),RLSE),             
//            DCB=(RECFM=FB,LRECL=88,BLKSIZE=1760)
//SYSTSIN DD *                                     
      LISTDS ('HLQ.TEST') LEVEL                 
//*                                               


Run the above jcl,you will get all dataseta LRECL information in the OUT.DATASET and you can fetch easily whatever datasets with use of SORT step
I hope this will help you.

Thanks;
Saravan