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

Difference bw VB & VBA Record Format


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krishna_Murty
Warnings : 2

New User


Joined: 17 Sep 2006
Posts: 24

PostPosted: Thu Oct 05, 2006 4:37 pm
Reply with quote

Can some one tell what is the difference between a VBA and VB RECFM?

Actually I need to produce a report in VBA format, the dataset
LRECL should be 137 and RECFM is VBA.

Now as per the report i need to write in this 137 LRECL output report at 55th Position a name called 'HOSPITAL'

So in coding the Cobol , at FD declaration and in the File Layout for positioning the
HOSPITAL at 55TH Position.

DATA DIVISION.
FILE SECTION.


FD REPORT-OUT
RECORDING MODE IS V
BLOCK CONTAINS 0
DATA RECORD IS MONTHLY-DATA.

01 RPT-DATA PIC X(133).

So while declaring at Recording Mode, is this V is Ok

Next coming to the Declaring the Working Storage Section, for throwing the HOSPITAL at 55th Position, can i declare as below.

01 RPT-LYT-NM.
05 FILLER PIC X(54) VALUE ALL '-'.
05 FILLER PIC X(24) VALUE 'HOSPITAL'

How much Length for filler from staring, i need to declare , is this 54 ok.

Regards
Krishna
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Thu Oct 05, 2006 8:13 pm
Reply with quote

Looks like this was previously answered refer to

http://ibmmainframes.com/viewtopic.php?t=8902&highlight=vba
Back to top
View user's profile Send private message
krishna_Murty
Warnings : 2

New User


Joined: 17 Sep 2006
Posts: 24

PostPosted: Fri Oct 06, 2006 10:19 am
Reply with quote

Looks good

But also can you please answer how the coding alters in respect to cobol program for my above situation, when the report is to be presented in VB compared to the report when presented in VBA.

Regards
Krishna
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Oct 06, 2006 11:08 pm
Reply with quote

Normally VB defintion is used to take account for variable record lenghts in file and file definition looks something like this:


Code:

    RECORDING MODE IS V                     
    LABEL RECORDS ARE STANDARD             
    RECORD CONTAINS LLL TO HHH CHARACTERS
    BLOCK CONTAINS 0 RECORDS               
    DATA RECORDS ARE 'XXX'-LLL-RECORD     
                                   'XXX'-MMM-RECORD
                                   'XXX'-HHH-RECORD.


01 'XXX'-LLL-RECORD    PIC   X(LLL).
01 'XXX'-MMM-RECORD    PIC  X(NNN).
    05   'XXX'-FILLER     PIC  X(LLL).
    05   'XXX'-REMAINING PIC X(RRR).
01 'XXX'-HHH-RECORD  PIC  X(HHH).   


where LLL is the lowest LRECL and HHH the highest LRECL.

For what you have:
Account for 1 byte additional (first byte) for attribute in WS due to VBA.
'RECORDING MODE V' is fine, and you will need to code VBA in DCB parameter of JCL, DCB=(MODEL.DSCB1,RECFM=VBA).

Hope this helps.
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top