IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to search 200 fixed block datasets with mixed LRECL?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thundercleesed

New User


Joined: 11 Apr 2006
Posts: 4
Location: Athens, OH

PostPosted: Thu Apr 02, 2009 4:34 am
Reply with quote

I need to search 200 fixed block datasets with mixed record lengths. After I submit the job to search, I receive the following after a 30 seconds of execution
Code:
SYSTEM COMPLETION CODE=0C4  REASON CODE=00000011


The output dataset does have a few results, but I do not believe all of the datasets were searched before the abend. Not sure how to proceed from here, any suggestions?

Code:
//SEARCH   EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,'')
//OUTDD    DD DSN=AAA.BBB.SORTED,
//            UNIT=DISK,
//            DISP=(NEW,CATLG,KEEP),
//            DCB=(LRECL=134,RECFM=FB),
//            SPACE=(TRK,(10,5),RLSE)
//SYSIN    DD *
SRCHFOR  'FIRSTNAME'
SRCHFOR  'MIDDLENAME'
SRCHFOR  'LASTNAME'
/*
//NEWDD    DD DSN=YYY.ZZZ.DD001,DISP=SHR
//         DD DSN=YYY.ZZZ.DD002,DISP=SHR
//         DD DSN=YYY.ZZZ.DD003,DISP=SHR
//         DD DSN=YYY.ZZZ.DD004,DISP=SHR
//         DD DSN=YYY.ZZZ.DD005,DISP=SHR
//         DD DSN=YYY.ZZZ.DD006,DISP=SHR
//         DD DSN=YYY.ZZZ.DD007,DISP=SHR
                   .
                   .
                   .
//         DD DSN=YYY.ZZZ.DD200,DISP=SHR
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 02, 2009 5:02 am
Reply with quote

From the JCL Language Reference (link at the top of the page):
Quote:
12.1.6.6 Logical Record Lengths for Concatenated Data Sets

Concatenated data sets with format-V records can have different logical record lengths as long as the data set with the largest logical record length appears first in the concatenation. (Note that you can state a value equal to the largest logical record length for LRECL on the first DD statement, regardless of what the actual logical record length of this data set is.)
Back to top
View user's profile Send private message
thundercleesed

New User


Joined: 11 Apr 2006
Posts: 4
Location: Athens, OH

PostPosted: Thu Apr 02, 2009 5:39 am
Reply with quote

I modified the JCL to include the DCB for each dataset
Code:
DCB=(RECFM=FB,LRECL=####)


I am still receiving the same errror though, any suggestions?
Code:
//SEARCH   EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,'')
//OUTDD    DD DSN=AAA.BBB.SORTED,
//            UNIT=DISK,
//            DISP=(NEW,CATLG,KEEP),
//            DCB=(LRECL=134,RECFM=FB),
//            SPACE=(TRK,(10,5),RLSE)
//SYSIN    DD *
SRCHFOR  'FIRSTNAME'
SRCHFOR  'MIDDLENAME'
SRCHFOR  'LASTNAME'
/*
//NEWDD    DD DSN=YYY.ZZZ.DD001,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=4096)
//         DD DSN=YYY.ZZZ.DD002,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=4096)
//         DD DSN=YYY.ZZZ.DD003,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=1938)
//         DD DSN=YYY.ZZZ.DD004,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=994)
//         DD DSN=YYY.ZZZ.DD005,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=850)
//         DD DSN=YYY.ZZZ.DD006,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=613)
//         DD DSN=YYY.ZZZ.DD007,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=600)
                   .
                   .
                   .
//         DD DSN=YYY.ZZZ.DD200,DISP=SHR,
//            DCB=(RECFM=FB,LRECL=13)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 02, 2009 5:49 am
Reply with quote

Hello,

Are the files fixed or variable length? Fixed, right?

Suggest you use a proc/pend and set up the dsn as a symbolic parameter and process one file per execution. The output can all be written (disp=mod) into the same output file to make use easier after the searches are done. Also, suggest you remove the dcb info from the jcl - it is not needed.

You would want a step before the PROC statement (iefbr14 or idcams) to catalog a new "output" file, so that all of the executions would append via the "mod". You would have 200 EXECs rather than 200 DDs. . . Suggest the sysin data be placed into a dataset so the search input need not be repeated.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 02, 2009 7:25 am
Reply with quote

Sorry, I missed the fixed in your post. My solution works for variable but not fixed; use Dick's solution for the fixed length files.
Back to top
View user's profile Send private message
thundercleesed

New User


Joined: 11 Apr 2006
Posts: 4
Location: Athens, OH

PostPosted: Thu Apr 02, 2009 7:11 pm
Reply with quote

I am curious as to why Robert's solution will only work with variable length?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Apr 02, 2009 7:16 pm
Reply with quote

From the JCL Language Reference (link at the top of the page):
Quote:
There are two types of sequential concatenation:

* Like. The same logical record length (LRECL) value and record format apply to all the data sets. The block size (BLKSIZE) values and device characteristics might differ.

* Unlike. Any of data set characteristics might differ. The application program must have logic to support this capability.
which goes with
Quote:
12.1.6.6 Logical Record Lengths for Concatenated Data Sets

Concatenated data sets with format-V records can have different logical record lengths as long as the data set with the largest logical record length appears first in the concatenation. (Note that you can state a value equal to the largest logical record length for LRECL on the first DD statement, regardless of what the actual logical record length of this data set is.)
You are explicitly allowed to use variable length records with different LRECL as long as the longest goes first. However, the same does not apply to fixed length records.
Back to top
View user's profile Send private message
thundercleesed

New User


Joined: 11 Apr 2006
Posts: 4
Location: Athens, OH

PostPosted: Fri Apr 03, 2009 1:22 am
Reply with quote

Thanks for the help and suggestions. For future reference, here is what I came up with
Code:
//**********************************************************************
//* CREATE: Create a new empty dataset to hold search results...
//**********************************************************************
//CREATE   EXEC PGM=IEFBR14
//NEWDD    DD DSN=AAA.BBB.RESULTS,
//            UNIT=DISK,
//            DISP=(NEW,CATLG),
//            DCB=(LRECL=134,RECFM=FB),
//            SPACE=(TRK,(10,5),RLSE)
//**********************************************************************
//* QUERYTXT: Place some search terms into temporary dataset...
//**********************************************************************
//QUERYTXT EXEC PGM=IEBGENER
//SYSABEND DD   SYSOUT=*
//SYSTOTAL DD   SYSOUT=*
//SYSLIST  DD   SYSOUT=*
//SYSPRINT DD   SYSOUT=*
//SYSUT2   DD DSN=&&QUERY,UNIT=DISK,
//            DISP=(NEW,PASS),
//            DCB=(LRECL=80,RECFM=FB),
//            SPACE=(TRK,(10,5),RLSE)
//SYSIN    DD   DUMMY
//SYSUT1   DD *
SRCHFOR  'FIRSTNAME'
SRCHFOR  'MIDDLENAME'
SRCHFOR  'LASTNAME'
/*
//**********************************************************************
//* SEARCH: In stream proc for searching given datasets...
//**********************************************************************
//SEARCH   PROC
//SEARCHIT EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,'')
//OUTDD    DD DSN=AAA.BBB.RESULTS,                 
//            UNIT=DISK,DISP=(MOD)                                     
//SYSIN    DD DSN=&&QUERY,DISP=SHR
//NEWDD    DD DSN=&DSNAME,DISP=SHR
//         PEND
//**********************************************************************
//* STEPS: Pass a dataset to search proc for processing...
//**********************************************************************
//STEP001  EXEC SEARCH,DSNAME=YYY.ZZZ.DD001
//STEP002  EXEC SEARCH,DSNAME=YYY.ZZZ.DD002
//STEP003  EXEC SEARCH,DSNAME=YYY.ZZZ.DD003
//STEP004  EXEC SEARCH,DSNAME=YYY.ZZZ.DD004
//STEP005  EXEC SEARCH,DSNAME=YYY.ZZZ.DD005
                 .
                 .
                 .
//STEP200  EXEC SEARCH,DSNAME=YYY.ZZZ.DD200
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 03, 2009 1:26 am
Reply with quote

You're welcome - thanks for the follow up icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top