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
 

 

Difference bw VB & VBA Record Format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Difference bw VB & VBA Record Format
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    Post subject: Re: Difference between VB & VBA Record Format
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    Post subject: Re: Difference between VB & VBA Record Format
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    Post subject: Re: Difference between VB & VBA Record Format
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    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 Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm


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