Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Jan 05, 2005 4:16 pm Post subject:
Ptf,
There are many ways of finding the LRECL of dataset. You can use Sort/easytrieve/sas to find the LRECL. Post clearly as to what you want to do after findout the LRECL
//MYJOB JOB( )...
//*
//STEP0001 EXEC PGM=IDCAMS
//IN DD DISP=SHR,DSN=&SYSUID..LRECL80.TEST
//OUT DD DISP=(NEW,PASS),UNIT=VIO,SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=80
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT) COUNT(1)
IF LASTCC > 0 THEN SET MAXCC = 0
ELSE SET MAXCC = 4
/*
//*
//STEP0002 EXEC PGM=IDCAMS
//IN DD DISP=SHR,DSN=&SYSUID..LRECL80.TEST
//OUT DD DISP=(NEW,PASS),UNIT=VIO,SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=100
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT) COUNT(1)
IF LASTCC > 0 THEN SET MAXCC = 0
ELSE SET MAXCC = 4
/*
//*
//STEP0003 EXEC PGM=IDCAMS
//IN DD DISP=SHR,DSN=&SYSUID..LRECL80.TEST
//OUT DD DISP=(NEW,PASS),UNIT=VIO,SPACE=(CYL,(1,1),RLSE),
// RECFM=FB,LRECL=120
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT) COUNT(1)
IF LASTCC > 0 THEN SET MAXCC = 0
ELSE SET MAXCC = 4
/*
//*
// IF (STEP0001.RC = 0) THEN
//* DO LRECL=80 LOGIC
// ENDIF
//*
// IF (STEP0002.RC = 0) THEN
//* DO LRECL=120 LOGIC
// ENDIF
In this example, the job checks for 3 possible LRECL values: 80, 100, or 120. The IDCAMS REPRO function can only successfully copy the test dataset to an output dataset with the same LRECL attributes.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum