Selecting all PS with LRECL=925



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Selecting all PS with LRECL=925

Postby nm992 » Tue Sep 14, 2010 1:21 pm

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')
/*
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Selecting all PS with LRECL=925

 

Re: Selecting all PS with LRECL=925

Postby dick scherrer » Tue Sep 14, 2010 11:53 pm

Hello,

Not directly - that i'm aware of.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Selecting all PS with LRECL=925

Postby MrSpock » Wed Sep 15, 2010 1:02 am

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.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Selecting all PS with LRECL=925

Postby nm992 » Wed Sep 15, 2010 2:34 pm

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
nm992
 
Posts: 43
Joined: Sun Jul 11, 2010 11:31 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Selecting all PS with LRECL=925

Postby MrSpock » Wed Sep 15, 2010 3:10 pm

//LISTDS EXEC PGM=IKJEFT01
//SYSTSPRT DD DSN=...
//SYSTSIN DD *
LISTDS 'HLQ.DATASET1'
LISTDS 'HLQ.DATASET2'
.....
/*
//*
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Selecting all PS with LRECL=925

Postby shyamsaravan » Wed Sep 15, 2010 6:30 pm

//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
shyamsaravan
 
Posts: 40
Joined: Tue May 11, 2010 7:56 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post