T.R | Title | User | Personal Name | Date | Lines |
---|
3985.1 | DECforms uses natural alignment by default on Alpha | DSSDEV::RICE | | Wed Feb 19 1997 08:37 | 5 |
| You are telling DECforms not to use natural alignment by using the /NOPAD
switch. That switch was added specifically for an older version of COBOL that
did not do natural alignment.
-Tim
|
3985.2 | Example showing the problem... | UTRTSC::DORLAND | The Wizard of Odz2 | Wed Feb 19 1997 09:15 | 189 |
| True, but using /PADDING both at the FORMS and COBOL also doesn't work.
In the examples below it will result in a FORMS-F-INTDATCOR.
What I am looking for is a correct way to use Forms and Cobol
in a aligned way. So far it looks as if there are COBOL constructs
which translate different from FORMS, which makes it difficult
to use alignment. The problem is that I can't tell right way
if COBOL is at fault or DecForms.
example :
IDENTIFICATION DIVISION.
PROGRAM-ID. T1.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. VAX-11.
OBJECT-COMPUTER. VAX-11.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 session-id PIC x(16).
01 forms-status pic s9(9) comp.
01 where-from pic x(9) value "SYS$INPUT".
01 rec_count pic s9(5) comp value 1.
01 personnel_record.
03 mygroup.
05 name pic x(1).
05 numbr pic s9(4) comp.
05 state pic x(1).
PROCEDURE DIVISION.
MAIN SECTION.
MAIN-01.
call "FORMS$ENABLE" using omitted
BY DESCRIPTOR where-from
BY DESCRIPTOR session-id
BY DESCRIPTOR 'TEST'.
call "forms$receive" USING
BY DESCRIPTOR session-id
BY DESCRIPTOR "PERSONNEL_RECORD"
BY REFERENCE rec_count
omitted omitted
omitted omitted
omitted omitted omitted
BY DESCRIPTOR personnel_record.
call "forms$disable" using by descriptor session-id.
EXIT PROGRAM.
$ COBOL/ALIGN=PAD T1
$ LINK T1
Form TEST
Form Data
NAME Character(1)
NUMBR Word Integer
STATE Character(1)
End Data
Form Record PERSONNEL_RECORD
GROUP MYGROUP
NAME Character(1)
NUMBR Word Integer
STATE Character(1)
END GROUP
End Record
Form Record CONTROL_WORKSPACE
ERROR_STATUS_FIELD Character(4)
MESSAGEPANEL Character(80)
End Record
Layout VT_LAYOUT
Device
Terminal
Type %VT100
End Device
Size 24 Lines by 80 Columns
Function QUIT_KEY
Is %F8
End Function
Disable Response
Request Exit Response
Remove All
End Response
End Response
Receive Response PERSONNEL_RECORD
Reset All
Display
EMPLOYEE_INFO_PANEL
Activate
Panel EMPLOYEE_INFO_PANEL
End Response
Function Response QUIT_KEY
Remove All
Return
" FQUT"
End Response
Panel EMPLOYEE_INFO_PANEL
Remove
Literal Text
Line 1
Column 23
Value "EMPLOYEE INFORMATION"
End Literal
Literal Text
Line 7
Column 1
Value "Employee name :"
End Literal
Literal Text
Line 8
Column 1
Value "Employee number:"
End Literal
Literal Text
Line 9
Column 1
Value "State:"
End Literal
Literal Text
Line 15
Column 1
Value "Press Return key to move cursor to next field; F12 to "-
"move backward."
End Literal
Literal Text
Line 16
Column 1
Value "Press Ctrl/Z to save data; PF8 to cancel."
End Literal
Field NAME
Line 7
Column 18
Output Picture X(1)
End Field
Field NUMBR
Line 8
Column 19
Output Picture S9(4)
End Field
Field STATE
Line 9
Column 18
Output Picture X(1)
End Field
Literal Text
Line 2
Column 23
Value "--------------------"
End Literal
Literal Rectangle
Line 6 Column 17
Line 12 Column 50
End Literal
End Panel
End Layout
End Form
$ FORM TRANSLATE/MEMBER/PAD TEST
|
3985.3 | Fixed the INTDATCOR | UTRTSC::DORLAND | The Wizard of Odz2 | Wed Feb 19 1997 09:25 | 7 |
| Oops. The COBOL field where-from must be declared as
pic x(10) VALUE 'SYS$INPUT:'. That works, but now COBOL
/ALIGN=PAD now produces a 8 byte length record so I
still have a problem. I'll cross prost this in COBOL
as well..
Rgds, Ton
|
3985.4 | Looks like COBOL | UTRTSC::DORLAND | The Wizard of Odz2 | Wed Feb 19 1997 10:02 | 5 |
| Well, the final answer is that some constructs in Dec Cobol
may result in different records than DecForms, and that it is
Dec Cobol which is not 100% natural alignment compliant.
Regards, Ton
|