fredericofonseca
IS-IT--Management
Hi all,
Company I am at the moment is doing a migration from MF version 2.2 to 5.1 and we come across one particular problem which im posting below. If anyone had had this experience and has been able to solve it with some compiler/runtime directive it would be great if I could have it.
Old environment
OS - HP UX 64b
MF compiler - Micro Focus Server Express V2.2 revision 000
New
OS - AIX 6.1
MF compiler - Micro Focus Server Express V5.1 revision 000
All programs in both cases being compiled and run in 32bit mode
Problem
Some programs have file descriptions for extracts with values on the record as follows.
FD FILE1-OUT-FILE.
01 FILE1-OUT-REC.
03 FILE1-OUT-POLICY PIC X(12).
03 FILE1-OUT-1 PIC X(1) VALUE ';'.
03 FILE1-OUT-PREM PIC 9(15).9(02).
03 FILE1-OUT-2 PIC X(1) VALUE ';'.
When running on HP the the records are written to the file with the ";" on it.
On AIX the same program does not keep the ";" and replaces it with spaces.
I am fully aware that according to MF manuals these values on the FD are invalid and therefore compiler version dependent, meaning that the correct thing to do would be to change the program to write from a WS group field instead, but if there is a solution that does not imply code changes it would be better at this stage.
Program code
Program output AIX
Program output HP
directives used - AIX
directives used - HP
Regards
Frederico Fonseca
SysSoft Integrated Ltd
FAQ219-2884
FAQ181-2886
Company I am at the moment is doing a migration from MF version 2.2 to 5.1 and we come across one particular problem which im posting below. If anyone had had this experience and has been able to solve it with some compiler/runtime directive it would be great if I could have it.
Old environment
OS - HP UX 64b
MF compiler - Micro Focus Server Express V2.2 revision 000
New
OS - AIX 6.1
MF compiler - Micro Focus Server Express V5.1 revision 000
All programs in both cases being compiled and run in 32bit mode
Problem
Some programs have file descriptions for extracts with values on the record as follows.
FD FILE1-OUT-FILE.
01 FILE1-OUT-REC.
03 FILE1-OUT-POLICY PIC X(12).
03 FILE1-OUT-1 PIC X(1) VALUE ';'.
03 FILE1-OUT-PREM PIC 9(15).9(02).
03 FILE1-OUT-2 PIC X(1) VALUE ';'.
When running on HP the the records are written to the file with the ";" on it.
On AIX the same program does not keep the ";" and replaces it with spaces.
I am fully aware that according to MF manuals these values on the FD are invalid and therefore compiler version dependent, meaning that the correct thing to do would be to change the program to write from a WS group field instead, but if there is a solution that does not imply code changes it would be better at this stage.
Program code
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. FILE1.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT FILE1-OUT-FILE ASSIGN TO "file1.out"
ORGANIZATION IS LINE SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD FILE1-OUT-FILE.
01 FILE1-OUT-REC.
03 FILE1-OUT-POLICY PIC X(12).
03 FILE1-OUT-1 PIC X(1) VALUE ';'.
03 FILE1-OUT-PREM PIC 9(15).9(02).
03 FILE1-OUT-2 PIC X(1) VALUE ';'.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
000-START-SECTION.
*====================
OPEN OUTPUT FILE1-OUT-FILE.
MOVE "1234" TO FILE1-OUT-POLICY.
WRITE FILE1-OUT-REC.
CLOSE FILE1-OUT-FILE.
GOBACK.
Program output AIX
Code:
1234
Code:
1234 ; ;
directives used - AIX
Code:
* Micro Focus Server Express V5.1 revision 000 24-Feb-11 11:48 Page 1
* file1.cbl
* Directives File: cobol.dir
* Accepted - showdir
* Accepted - settings
* Accepted - ibmcomp
* Accepted - outdd
* Accepted - spzero
* Accepted - trace
* Accepted - foldcopyname"lower"
* Rejected - filecase
* Accepted - list()
* End Of Directives File: cobol.dir
* Setting: NOACCEPTREFRESH NOACU NOADV ALIGN"8" ALPHASTART"1" ALTER NOAMODE
* NOANIM NOANIMPREP ANS85 NOAPOST NOAREACHECK ARITHMETIC"MF" ASSIGN
* "DYNAMIC" NOASSIGN-PRINTER NOAUTOLOCK NOBELL BOUND NOBRIEF NOBS2000
* BWZSTAR NOBYTEMODEMOVE CALLFH"EXTFH" NOCALLMCS NOCALLRECOVERY
* CALLSORT"EXTSM" CANCEL CANCELLBR NOCHANGEMESSAGE CHARSET"ASCII"
* CHECKDIV"ANSI" NOCHECKREFMOD NOCICS CICS-CPY NOCICSOPTIMIZE NOCMPR2
* NOCOBFSTATCONV NOCOBIDY NOCOBOL370 COBOLDIR NOCOMP COMP-5"2" COMP-6
* "2" NOCOMS85 NOCONFIRM NOCONVERTRET CONVSPACE COPYEXT",cbl,cpy"
* NOCOPYLBR COPYLIST COPYLISTCOMMENT"1" NOCSI CURRENCY-SIGN"36"
* CURRENT-DATE"MMDDYY" NODATA DATACOMPRESS"0" NODATA-CONTEXT DATE
* DBCHECK DBCS"3" NODBCSSOSI DBSPACE DE-EDIT"2" DEFAULTBYTE"32"
* NODEFAULTCALLS DETECTLOCK NODG DIALECT"MF" NODIRECTIVES-IN-COMMENTS
* NODOSVS NODPCINSUBSCRIPT DYNAM NOEARLY-RELEASE ECHO NOECHOALL
* NOEDITOR ENSUITE"0" NOENTCOBOL ERRFORMAT"1" ERRLIST"EMBED" NOERRQ
* FASTSORT NOFCD3 NOFCDREG NOFDCLEAR NOFILESHARE FILETYPE"0" NOFLAG
* NOFLAGAS NOFLAGCD NOFLAGEUC NOFLAGMIG NOFLAGQ FLAGSINEDIT NOFLAGSTD
* NOFOLDCALLNAME FOLDCOPYNAME"LOWER" FORM"60" NOFP-ROUNDING
* NOHOSTARITHMETIC NOHOST-NUMCOMPARE NOHOST-NUMMOVE NOHOSTFD NOIBM-MS
* IBMCOMP IDXFORMAT"0" NOILGEN IMPLICITSCOPE NOINDD INFORETURN"0"
* NOINITCALL INT"file1.int" INTDATE"ANSI" INTLEVEL"2" IOCONV
* NOISO2002 NOIXNLSKEY NOIXNUMKEY KEEP-INT KEYCHECK KEYCOMPRESS"0"
* NOLIBRARIAN NOLINE-COUNT LIST"file1.lst" LISTPATH"" LISTWIDTH"80"
* LITVAL-SIZE"4" LOCKTYPE"0" NOMAPNAME NOMAXERROR METHODDEFAULT
* "REFERENCE" MF"13" MFCOMMENT NOMOVELENCHECK NOMS NOMVS NATIVE
* "ASCII" NONATIVEFLOATINGPOINT NONCHAR NONEWBASENAME NONLS NSYMBOL
* "DBCS" NOODOOSVS NOODOSLIDE NOOLDBLANKLINE NOOLDCOPY NOOLDINDEX
* NOOLDNEXTSENTENCE NOOLDREADINTO NOOLDSTRMIX OOCTRL
* "-C-E-G-P+Q+R-S+W" OPTIONAL-FILE NOOS390 OSEXT"" NOOSVS OUTDD
* "SYSOUT 132 L" NOP64 NOPANVALET PERFORM-TYPE"MF" NOPREPLIST
* NOPREPROCESS NOPRINT-EXT NOPROFILE NOPROGID-COMMENT
* NOPROGID-INT-NAME NOPROTECT-LINKAGE PROTOTYPE"RELAXED" QUAL
* QUALPROC NOQUERY QUOTE NORAWLIST NORDW RECMODE"F" NOREENTRANT NOREF
* NOREFNO REMAINDER"1" REPORT-LINE"256" RESEQ NORETRYLOCK REWRITE-LS
* NORM RTNCODE-SIZE"4" NORWHARDPAGE NOSAA SEG NOSEQCHK SEQUENTIAL
* "RECORD" NOSERIAL SETTING"LINE" NOSHAREOUTDD SHOW-DIR SIGN"ASCII"
* NOSIGNFIXUP SORTTYPE"DFSORT" SOURCEFORMAT"FIXED" SOURCETABSTOP"8"
* SPZERO NOSSRANGE STDERR NOSTICKY-LINKAGE NOSTICKY-PERFORM SUPFF
* SWITCHTYPE"1" SYMBSTART"1" SYSPUNCH"132" TERMPAGE TIME TRACE TRUNC
* "ANSI" NOTRUNCCALLNAME NOTRUNCCOPY TRUNCINC"10" UNICODE"NATIVE"
* NOVERBOSE NOVSC2 WARNING"1" NOWB NOWB2 NOWB3 WEBSERVER"CGI"
* NOWRITELOCK NOWRITETHRU NOXOPEN NOXREF NOZEROLENGTHFALSE NOZEROSEQ
* NOZWB
Code:
Micro Focus Server Express V2.2 revision 000 24-Feb-11 11:13 Page 1
* file1.cbl
* Directives File: cobol.dir
* Accepted - showdir
* Accepted - settings
* Accepted - ibmcomp
* Accepted - outdd
* Accepted - spzero
* Accepted - trace
* Accepted - foldcopyname"lower"
* Rejected - filecase
* Accepted - list()
* End Of Directives File: cobol.dir
* Setting: NOACCEPTREFRESH NOADV ALIGN"8" ALPHASTART"1" ALTER NOANIM
* NOANSI2000 ANS85 NOAPOST NOAREACHECK ARITHMETIC"MF" ASSIGN"DYNAMIC"
* NOASSIGN-PRINTER NOAUTOLOCK NOBELL BOUND NOBRIEF NOBS2000 NOBWZSTAR
* NOBYTEMODEMOVE CALLFH"EXTFH" NOCALLMCS NOCALLRECOVERY CALLSORT
* "EXTSM" CANCELLBR NOCHANGEMESSAGE CHARSET"ASCII" CHECKDIV"ANSI"
* NOCICS CICS-CPY NOCICSOPTIMIZE NOCMPR2 NOCOBFSTATCONV NOCOBIDY
* NOCOBOL370 COBOLDIR NOCOMP COMP-5"2" COMP-6"2" NOCOMS85 NOCONFIRM
* NOCONVERTPTR NOCONVERTRET CONVSPACE COPYEXT",cbl,cpy" NOCOPYLBR
* COPYLIST NOCSI CURRENCY-SIGN"36" CURRENT-DATE"MMDDYY" NODATA
* DATACOMPRESS"0" NODATA-CONTEXT DATE DBCHECK DBCS"3" NODBCSSOSI
* DBSPACE DE-EDIT"2" DEFAULTBYTE"32" NODEFAULTCALLS DETECTLOCK NODG
* DIALECT"MF" NODIRECTIVES-IN-COMMENTS NODOSVS NODPCINSUBSCRIPT DYNAM
* NOEARLY-RELEASE ECHO NOECHOALL NOEDITOR ENSUITE"0" ERRLIST"EMBED"
* NOERRQ FASTSORT NOFCD3 NOFCDREG NOFDCLEAR NOFILESHARE FILETYPE"0"
* NOFLAG NOFLAGAS NOFLAGCD NOFLAGEUC NOFLAGMIG NOFLAGQ FLAGSINEDIT
* NOFLAGSTD NOFOLDCALLNAME FOLDCOPYNAME"LOWER" FORM"60" NOFP-ROUNDING
* NOHOST-NUMCOMPARE NOHOST-NUMMOVE NOHOSTFD NOIBM-MS IBMCOMP
* IDXFORMAT"0" IMPLICITSCOPE NOINDD INFORETURN"0" NOINITCALL INT
* "file1.int" INTDATE"ANSI" INTLEVEL"2" IOCONV NOISO2000 NOIXNLSKEY
* NOIXNUMKEY KEEP-INT KEYCHECK KEYCOMPRESS"0" NOLIBRARIAN
* NOLINE-COUNT LIST"file1.lst" LISTPATH"" LISTWIDTH"80" LITVAL-SIZE
* "4" LOCKTYPE"0" NOMAPNAME NOMAXERROR MF"12" MFCOMMENT
* NOMOVELENCHECK NOMS NATIVE"ASCII" NONCHAR NONESTCALL NONLS
* NOODOOSVS NOODOSLIDE NOOLDBLANKLINE NOOLDCOPY NOOLDINDEX
* NOOLDNEXTSENTENCE NOOLDREADINTO NOOLDSTRMIX OOCTRL
* "-C-E-G-P+Q+R-S-W" OPTIONAL-FILE OSEXT"" NOOSVS OUTDD
* "SYSOUT 132 L A" NOP64 NOPANVALET PERFORM-TYPE"MF" NOPREPLIST
* NOPREPROCESS NOPRINT-EXT NOPROFILE NOPROGID-COMMENT
* NOPROTECT-LINKAGE PROTOTYPE"RELAXED" QUAL QUALPROC NOQUERY QUOTE
* NORAWLIST NORDEFPTR NORDW RECMODE"F" NOREENTRANT NOREF NOREFNO
* REMAINDER"1" REPORT-LINE"256" RESEQ NORETRYLOCK REWRITE-LS NORM
* NORNIM RTNCODE-SIZE"4" NORWHARDPAGE NOSAA SEG NOSEQCHK SEQUENTIAL
* "RECORD" NOSERIAL SETTING"LINE" SHOW-DIR SIGN"ASCII" SOURCEFORMAT
* "FIXED" SPZERO NOSSRANGE STDERR NOSTICKY-LINKAGE NOSTICKY-PERFORM
* SUPFF SYMBSTART"1" TERMPAGE TIME TRACE TRUNC"ANSI" NOTRUNCCALLNAME
* NOTRUNCCOPY NOVERBOSE NOVSC2 WARNING"1" NOWB NOWB2 NOWB3 WEBSERVER
* "CGI" NOWRITELOCK NOWRITETHRU NOXOPEN NOXREF NOZEROLENGTHFALSE
* NOZEROSEQ NOZWB
Regards
Frederico Fonseca
SysSoft Integrated Ltd
FAQ219-2884
FAQ181-2886