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: 1200
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: 1200
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Confusion b/w index and subscript Deepak kumar25 Mainframe Interview Questions 7 Thu Aug 31, 2017 6:50 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

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