Obtain LRECL of Data SET



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

Obtain LRECL of Data SET

Postby usuario24 » Thu Jul 08, 2010 3:31 pm

Hi everyone:

Do you know how to get information of DATA SET like LRECL in JCL

I need to get this information for an automatic task and i dont know how to do it

Thanks a lot
usuario24
 
Posts: 9
Joined: Thu Jul 08, 2010 3:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Obtain LRECL of Data SET

 

Re: Obtain LRECL of Data SET

Postby expat » Thu Jul 08, 2010 4:22 pm

Tell us why you need to know the LRECL dynamically and I am sure that someone will be able to suggest something appropriate.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Obtain LRECL of Data SET

Postby MrSpock » Thu Jul 08, 2010 4:24 pm

You could run the TSO LISTDS command in batch.
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: Obtain LRECL of Data SET

Postby steve-myers » Thu Jul 08, 2010 4:53 pm

If you need to use the DCB attributes of (for example) data set A to allocate data set B, you can do this in JCL; DCB=(A).
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Obtain LRECL of Data SET

Postby usuario24 » Thu Jul 08, 2010 5:16 pm

I need to check if the LRECL of a large quantity of DATASET's has changed from last execution

So i've got in a table the previous lrecl and i want to save in a dataset the name and the lrecl of the datasets to compare, and later compare one by one in a COBOL program with the values of the table.

So i want to create a JCL that could create a dataset with the name of the dataset and his lrecl, to later merge it all and go to the cobol program

Sorry for not explain it before
usuario24
 
Posts: 9
Joined: Thu Jul 08, 2010 3:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Obtain LRECL of Data SET

Postby usuario24 » Thu Jul 08, 2010 7:47 pm

I've tried listds and returns an RC=12

//PASO02 EXEC PGM=IDCAMS
//SYSPRINT DD DSN=TSDEVAR.BLJSMNOM.FINAL02,
// DISP=(,CATLG,CATLG),STORCLAS=SCDEPER,
// SPACE=(500,(150,15),RLSE),AVGREC=K,
// RECFM=FB,LRECL=500
//SYSIN DD *
LISTDS 'TSDEVAR.BLJSMNOM.FINAL12'

The return code is:
1IDCAMS SYSTEM SERVICES TIME
0
LISTDS 'TSDEVAR.BLJSMNOM.FINAL12'
0IDC3219I VERB NAME 'LISTDS' UNKNOWN
0IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12
0
0IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 12

So i can submit it through idcams.

¿Do you know how to do it in BATCH?

Could you give me an example pls?
usuario24
 
Posts: 9
Joined: Thu Jul 08, 2010 3:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Obtain LRECL of Data SET

Postby MrSpock » Thu Jul 08, 2010 8:41 pm

//*                                                       
//PAS002 EXEC PGM=IKJEFT01                               
//SYSTSPRT DD   DSN=TSDEVAR.BLJSMNOM.FINAL02,             
//         DISP=(,CATLG,DELETE),STORCLAS=SCDEPER,         
//         SPACE=(500,(150,15),RLSE),AVGREC=K             
//SYSTSIN  DD   *                                         
LISTDS 'TSDEVAR.BLJSMNOM.FINAL12'     
LISTDS '.....'
...                     
/*                                                         
//*
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: Obtain LRECL of Data SET

Postby MrSpock » Thu Jul 08, 2010 8:43 pm

usuario24 wrote:So i've got in a table the previous lrecl and i want to save in a dataset the name and the lrecl of the datasets to compare, and later compare one by one in a COBOL program with the values of the table.


I have to ask. Then why not just deal with this directly from within that COBOL program?
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: Obtain LRECL of Data SET

Postby usuario24 » Thu Jul 08, 2010 9:33 pm

Thanks a lot.

It is exactly what i was looking for. Works fine.

Thanks everybody again.

Was a Pleasure
usuario24
 
Posts: 9
Joined: Thu Jul 08, 2010 3:22 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post