Hex Characters on Mainframe Work Files

My company has about 30-40 Easytrieve programs that need to be converted to Natural. I am able to duplicate in Natural what the Easytrieve program is producing as far as the raw data goes. However, for packed fields, the Easytrieve program signs the fields with a ‘C’, whereas my Natural program signs a Packed field with an ‘F’.

Both programs move a P7 format field from the Input Work file to the Output Work file. There is no other data manipulation taking place. Both programs are on the Mainframe.

Is there a Global setting that can be put into a Batch Natural program so that a packed field will be signed with a ‘C’ instead of an ‘F’ so that my file comparisons will match for documentation purposes ?

Thanks,

Tadd Yarbrough
Sr. Programmer/Analyst
AVX Corporation
Fountain Inn, SC USA

Sounds like you are looking for this COMPOPT ?

PSIGNF - Internal Representation of Positive Sign of Packed Numbers

ON The positive sign of a packed number is represented internally as H’F’. This is the default value.
OFF The positive sign of a packed number is represented internally as H’C’.

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat825mf/syscom/compopt.htm#PSIGNF

Finn,

I tried your suggestion and here’s what happened:

(JCL)

//STEP040 EXEC NATURAL,DBID=D001,PARM=‘OPRB=(.ALL),COMPOPT=OFF
//DDCARD DD DSN=ADABAS.&DBID…PARMLIB(PREFETCH),DISP=SHR
//AR3004 DD DSN=ARPROD.ARV312.AR3004,DISP=SHR
//CMWKF01 DD DSN=ARTEST.ARV312.AR3001.FLATIN,DISP=SHR
//CMWKF02 DD DSN=ARTEST.JAR019D.STEP040.CASHAPP.FILE,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=132,BLKSIZE=27984),
// SPACE=(4096,(100,10),RLSE),
// UNIT=SYSTST
//SYSOUT DD SYSOUT=*
//DATA DD *
LOGON ACCTBTCH
PAR021 XX
//*

(Error Message)

PAGE 1 09/01/15 10:08:30
10:08:30 ***** ERRORS DURING INIITALISATION ***** 09/01/15
- LIST ERRORS -
NAT7008 PARAMETER COMPOPT NON-EXISTENT OR NOT ALLOWED DYNAMICALLY.
Logon accepted to library COSEBTCH.
NEXT LOGON ACCTBTCH
Logon accepted to library ACCTBTCH.
NEXT PAR021 XX
Page 1 09/01/15 10:08:30
RUN TYPE: XX
RUN TIME: 00:00:01.2

I failed to mention we are Natural 3.1.5 and OS/390 v2.10.

Thanks,

Tadd Yarbrough
Sr. Programmer/Analyst
AVX Corporation
Fountain Inn, SC USA

Sorry for using internal “slang”
COMPOPT is short for “compiler option”
So you need to specify this and recompile the program.

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat825mf/syscom/compopt.htm

Finn,

Keyed in COMPOPT on the command line inside the Natural Editor and found this:

==============================================================
10:31:26 ***** NATURAL COMPOPT COMMAND ***** 09/01/2015
USER TADD - COMPILATION OPTIONS - LIBRARY ACCTBTCH

(KCHECK) KEYWORD CHECKING … OFF
(PCHECK) PARAMETER CHECKING FOR CALLNAT STATEMENTS … OFF
(DBSHORT) INTERPRETATION OF DATABASE SHORT FIELD NAMES … ON
(PSIGNF) INTERNAL REPRESENTATION OF POSITIVE SIGN OF PACKED NUMBERS … OFF
(TSENABL) APPLICABILITY OF TS PROFILE PARAMETER … OFF
(GFID) GENERATION OF GLOBAL FORMAT IDS … ON
(LOWSRCE) ALLOW LOWER CASE SOURCE … OFF

VERSION COMPATIBILITY OPTIONS
(FINDMUN) DETECT INCONSISTENT COMPARISON LOGIC IN FIND STATEMENTS … OFF
(V22COMP) ALLOW OLD VERSION 2.2 SYNTAX … OFF

COMMAND ===>
ENTER-PF1—PF2—PF3—PF4—PF5—PF6—PF7—PF8—PF9—PF10–PF11–PF12—
HELP PRINT EXIT UPDAT CANC

In 21+ years as a Natural programmer, I’ve never seen this screen or knew it even existed. The PSIGNF value was originally set to ‘ON’. I changed it to ‘OFF’ and now my program is mirroring the Easytrieve program.

Thank You for your help and quick response.

Tadd Yarbrough
Sr. Programmer/Analyst
AVX Corporation
Fountain Inn, SC USA

To ensure the setting, so that the next compile doesn’t accidentally reverse it, you can code it within your program. For example

END-DEFINE
OPTIONS PSIGNF=ON
...

I like this solution a little bit better. Never sure what a global setting change with do to my other programs.

Thanks to you both for the suggestions.