View previous topic :: View next topic
|
Author |
Message |
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
Back to top |
|
|
krishna_Murty Warnings : 2 New User
Joined: 17 Sep 2006 Posts: 24
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
|