MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Execute a JOB STEP if the LRECL of a dataset is > 100

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Jaidev
Beginner


Joined: 05 Jan 2003
Posts: 7
Topics: 4
Location: India

PostPosted: Sun Mar 16, 2003 11:36 am    Post subject: Execute a JOB STEP if the LRECL of a dataset is > 100 Reply with quote

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 Very Happy


Regards,
Jaidev
Back to top
View user's profile Send private message Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun Mar 16, 2003 2:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Mar 16, 2003 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
CaptBill
Beginner


Joined: 02 Dec 2002
Posts: 100
Topics: 2
Location: Pasadena, California, USA

PostPosted: Mon Mar 17, 2003 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group