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

how to read records from variable blocked dataset


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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:

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


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 Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top