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

Variable length records / Alternate Index code in JCL


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nagalakshmi

New User


Joined: 23 Feb 2005
Posts: 7

PostPosted: Sat Mar 05, 2005 3:42 pm
Reply with quote

Questions at the Interview Panel.

1. What is the JCL statement & Cobol Select, FD entry for Variable Length records file

2. What is the JCL coding for a file being read with Alternate Key.

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

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Sat Mar 05, 2005 11:09 pm
Reply with quote

Quote:
JCL statement

DCB=
LRECL = Specify the maximum length, in bytes, for variable-length records.
RECFM = V (Varible length) or VB (Variable length Blocked)

indicates that the records are variable length; variable records cannot be in ASCII.

Example:

Code:
  //DD1A  DD    DSNAME=PHYF,DISP=(NEW,KEEP),UNIT=3380,
  //            DCB=(RECFM=VB,LRECL=80,BLKSIZE=800),
  //            SPACE=(23472,(200,40))




Quote:
Cobol Select

same as Fixed Length File

Example:
Code:
SELECT LOGF ASSIGN TO DD1A


Quote:
FD entry

RECORD IS VARYING IN SIZE FROM Integer-6 TO integer-7 CHARACTERS DEPENDING ON data-name-1

Example:

Code:
FD LOGF.
     RECORD CONTAINS 1 TO 80 CHARACTERS DEPENDING ON VAR1.


Quote:
JCL coding for a file being read with Alternate Key


If Base Cluster Name is DD1A then use DD1A1 as Alternative Index ddnames.

Ex:

Code:
DD1A DD DSN=BaseCluster
DD1A1 DD DSN=AIXPath
-
-
-
DD1A253 DD DSN=AixPath


Check this topic to know more about AIX:

www.ibmmainframes.com/viewtopic.php?t=148
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Mar 05, 2005 11:45 pm
Reply with quote

Hi MM,

I think you got the DD wrong. It s/b:
Code:

  //DD1A  DD    DSNAME=PHYF,DISP=(NEW,KEEP),UNIT=3380,
  //          DCB=(RECFM=VB,LRECL=84,BLKSIZE=800),
  //          SPACE=(23472,(200,40))

Notice the LRECL s/b 84 (or the FD s/b 76)
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Sun Mar 06, 2005 12:12 am
Reply with quote

Oh sorry!

I have to code LRECL=84 to have 10 logical records in the block.
The maximum logical record length is 80 and the remaining 4 chars will contain the actual run time length of each record in that file.

Thanks mmwife.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top