Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL to find/verify the Record format of a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ansnero

New User


Joined: 26 May 2006
Posts: 13

PostPosted: Wed May 21, 2008 11:00 pm    Post subject: JCL to find/verify the Record format of a dataset
Reply with quote

Hi,
I have an input dataset. Does any body know how I can write a JCL where
I can verify whether the RECFM of input dataset is VB or FB?

Thanks
Nero
Back to top
View user's profile Send private message

Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed May 21, 2008 11:29 pm    Post subject:
Reply with quote

If the tape has standard labels you can dump the header records. Consult the DFSMS Using Tapes manual for the fields indicating RECFM.
Code:
//DUMPHDR  EXEC PGM=IEBGENER                   
//SYSPRINT DD SYSOUT=*                         
//SYSUT1   DD DSN=FILE.NAME,VOL=SER=111111,     
//           LABEL=(1,BLP),UNIT=TAPE,DISP=OLD, 
//           RECFM=FB,LRECL=80,BLKSIZE=8000     
//SYSUT2   DD SYSOUT=*,                         
//           RECFM=FB,LRECL=80,BLKSIZE=8000     
//SYSIN    DD DUMMY                             
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 21, 2008 11:39 pm    Post subject: Reply to: JCL to find/verify the Record format of a dataset
Reply with quote

Use TSO LISTDS in batch:

Code:

//STEPX EXEC PGM=IKJEFT01,
// PARM='LISTDS ''MY.DATASET'''
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY


or a SORT:

Code:

//STEPX EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=MY.DATASET
//SORTOUT DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  OMIT COND=ALL
/*


or a REXX exec:

Code:

//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD *,DLM=@@
/* REXX */
RC = LISTDSI(IN 'FILE')
SAY SYSRECFM
EXIT 0
@@
//SYSUT2 DD DSN=&&PDS(X),DISP=(,PASS),UNIT=VIO,
// SPACE=(TRK,(1,1,1))
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//STEP2 EXEC PGM=IKJEFT01,PARM='%X'
//SYSPROC DD DSN=&&PDS,DISP=(OLD,DELETE)
//IN DD DISP=SHR,DSN=MY.DATASET
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
Back to top
View user's profile Send private message
ansnero

New User


Joined: 26 May 2006
Posts: 13

PostPosted: Thu May 22, 2008 10:55 pm    Post subject:
Reply with quote

Hi, Thanks a lot for the solution. What if I need to the output to be used in the next step of the JCL. Some thing like if the input file is VB then execute some proc.. ?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu May 22, 2008 11:35 pm    Post subject: Reply to: JCL to find/verify the Record format of a dataset
Reply with quote

That's up to you. The assumption from your original post is that you would capture the results into a dataset, and then in a subsequent step read that dataset and take the appropriate course of action.

If you were to check the RECFM from within a program, then you could interrogate the results and set a return-code value. Then, subsequent steps could execute (or be sypassed) based on the return-code value.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts PDSFAST VERIFY - What does it really ... shetttigarvivek JCL & VSAM 1 Tue Nov 29, 2016 9:21 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us