View previous topic :: View next topic |
Author |
Message |
Jaidev Beginner
Joined: 05 Jan 2003 Posts: 7 Topics: 4 Location: India
|
Posted: Sun Mar 16, 2003 11:36 am Post subject: Execute a JOB STEP if the LRECL of a dataset is > 100 |
|
|
Hi All,
Do we have any kind of utility or a JCL syntax, which can get me the LRECL of a dataset???
I want to execute a JOB STEP if LRECL of a preticular dataset is, say greater than 100. I could have written a PGM for this, but my instinct says there must be something which will give me a shrotcut and save me from writing a whole program for this
Regards,
Jaidev |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun Mar 16, 2003 2:54 pm Post subject: |
|
|
I don't know about a utility, but that 'whole program' is only 2 lines (4 with error checking).
call listdsi(...)
return syslrecl |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sun Mar 16, 2003 11:45 pm Post subject: |
|
|
Jaidev,
If you have easytrieve at your shop then the following JCl will give you the desired results.
Code: |
//STEP0100 EXEC PGM=EZTPA00
//*
//STEPLIB DD DSN=EASYTREV.LOADLIB,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//FILEIN DD DSN=YOUR FILE IN QUESTION,
// DISP=SHR
//SYSIN DD *
FILE FILEIN
JOB INPUT (FILEIN)
IF FILEIN:RECORD-LENGTH > 100
MOVE 200 TO RETURN-CODE
ELSE
MOVE 100 TO RETURN-CODE
END-IF
STOP
/*
|
In the next step check for the return-code using IF THEN ELSE and execute the step
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Mon Mar 17, 2003 2:53 pm Post subject: |
|
|
If you have VISION:Results available at your installation, the following job will geve you a non zero return code. You can test the result in the step to determine if you want to run it.
Code: |
//DYL280 EXEC PGM=DYL280
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYS004 DD UNIT=SYSDA,SPACE=(TRK,(10,5))
//SYS280R DD SYSOUT=*
//*
//DEMOFILE DD DSN=your.file.in.question,DISP=SHR
//*
//SYSIN DD *
FILE DEMOFILE LENGTH DEMOLEN
*$$DEMOFILE DD DISP=SHR,DSN=SYSL.RESULTS.DEMOFILE
IF DEMOLEN GT 100
MOVE 50 TO DYLRETURN
ENDIF
STOP
/*
//*
|
|
|
Back to top |
|
 |
|
|