Page 1 of 1
Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 3:31 pm
by usuario24
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
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 4:22 pm
by expat
Tell us why you need to know the LRECL dynamically and I am sure that someone will be able to suggest something appropriate.
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 4:24 pm
by MrSpock
You could run the
TSO LISTDS command in batch.
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 4:53 pm
by steve-myers
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).
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 5:16 pm
by usuario24
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
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 7:47 pm
by usuario24
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?
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 8:41 pm
by MrSpock
//*
//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 '.....'
...
/*
//*
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 8:43 pm
by MrSpock
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?
Re: Obtain LRECL of Data SET
Posted:
Thu Jul 08, 2010 9:33 pm
by usuario24
Thanks a lot.
It is exactly what i was looking for. Works fine.
Thanks everybody again.
Was a Pleasure