Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1207
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: 1207
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 What will happen if we dont code STOP... Poha Eater COBOL Programming 4 Mon Jun 04, 2018 5:27 pm
No new posts JCL to set Return code when Time Out ... vinu78 JCL & VSAM 6 Wed May 30, 2018 11:27 am
This topic is locked: you cannot edit posts or make replies. Rexx code to find greater then symobl... Bharath Vikraman CLIST & REXX 8 Tue May 29, 2018 9:40 am
No new posts RESP2 code -502 pshongal CICS 6 Mon May 28, 2018 10:58 am
No new posts Code Coverage and static analysis too... Aditya.Srivastava PL/I & Assembler 2 Fri May 25, 2018 12:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us