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
 

 

how to read records from variable blocked dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Suryyogi

New User


Joined: 17 Jun 2006
Posts: 27

PostPosted: Fri Sep 01, 2006 5:14 pm    Post subject: how to read records from variable blocked dataset
Reply with quote

can anybody tell me plz
how to specify FD entry for file which is variable blocked
plz give example.

i have a file having record length 80 record format VB and blocksize 800
.
regards
yogesh
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Sep 02, 2006 12:54 am    Post subject: Re: how to read records from variable blocked dataset
Reply with quote

Reading/Writing variable records has been discussed many times. Do a search and if your question is not answered, please come back.

Dave
Back to top
View user's profile Send private message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Tue Sep 05, 2006 12:16 pm    Post subject: Re: how to read records from variable blocked dataset
Reply with quote

Suryyogi wrote:
can anybody tell me plz
how to specify FD entry for file which is variable blocked
plz give example.

i have a file having record length 80 record format VB and blocksize 800
.
regards
yogesh



Hi

here is one example :

here we use 4 layout to see the content of one VB file

FD ERD-FILE
RECORDING MODE IS V
RECORD CONTAINS 42 TO 205 CHARACTERS
BLOCK CONTAINS 0 RECORDS
LABEL RECORD ARE STANDARD
DATA RECORDS ARE P-MER-INFO-REC
P-OR-DETL-INFO
P-ORT-SE-INFO
P-ORTR-OBE-INFO.
++INCLUDE AAAA (FOR P-MER-INFO-REC -> LRECL= 83)
++INCLUDE BBBB (FOR P-OR-DETL-INFO -> LRECL= 205)
++INCLUDE CCCC (FOR P-ORT-SE-INFO -> LRECL= 59 )
++INCLUDE DDDD (FOR P-ORTR-OBE-INFO -> LRECL= 42)


NOTE THAT HERE WE HAD USED INCLUDES FOR FILE LAYOUT.

ALSO IN JCL YOU NEED TO DEFINE LRECL 4 BYTES MORE THAN MAX LRECL .(block size does not has any effect)

EG :


FILE DD DSN=FILE NAME ,
DISP=(NEW,CATLG,DELETE),
SPACE=(CYL,(100,50),RLSE),UNIT=SYSDA,
DCB=(LRECL=209,RECFM=VB,BLKSIZE=0)

HOPE this clears your doubt.
thanks
Back to top
View user's profile Send private message
sudhakar_mainframe
Warnings : 1

New User


Joined: 29 Jun 2006
Posts: 25

PostPosted: Fri Sep 08, 2006 11:49 am    Post subject:
Reply with quote

Hi shrinivas_3,

I have one small doubt about Logical record length.Why we are

giving it as (Size + 4) bytes in DCB.


Thanks,
Sudhakar
Back to top
View user's profile Send private message
shrinivas_3
Warnings : 1

New User


Joined: 05 Sep 2006
Posts: 34

PostPosted: Fri Sep 08, 2006 1:27 pm    Post subject:
Reply with quote

sudhakar_mainframe wrote:
Hi shrinivas_3,

I have one small doubt about Logical record length.Why we are

giving it as (Size + 4) bytes in DCB.


Thanks,
Sudhakar


Hi

whenever we deal with variable length file , we need to give 4bytes extra. Variable-length records are prefixed and suffixed by 4 bytes of control information containing length fields. The 4-byte integer value stored in each length field indicates the number of data bytes (excluding overhead bytes) in that particular variable-length record.

try out below link for more information:

http://www.simotime.com/cblv8001.htm

thanks
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm


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