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
 

 

Variable length records / Alternate Index code in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Variable length records / Alternate Index code in JCL
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: 1202
Location: India

PostPosted: Sat Mar 05, 2005 11:09 pm    Post subject:
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:

http://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    Post subject:
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: 1202
Location: India

PostPosted: Sun Mar 06, 2005 12:12 am    Post subject: Re
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


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