# Hex Characters on Mainframe Work Files

**URL:** <https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [September 1, 2015, 3:37pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616 "2015-09-01T15:37:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tadd\_Yarbrough1](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Tadd\_Yarbrough1](https://techcommunity.softwareag.com/u/Tadd_Yarbrough1)\
**Post date:** [September 1, 2015, 3:37pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/1 "2015-09-01T15:37:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [September 1, 2015, 3:51pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/2 "2015-09-01T15:51:30Z")

</div>

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](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat825mf/syscom/compopt.htm#PSIGNF)

---

<div class="post-metadata">

**Author:** ![Tadd\_Yarbrough1](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Tadd\_Yarbrough1](https://techcommunity.softwareag.com/u/Tadd_Yarbrough1)\
**Post date:** [September 1, 2015, 4:05pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/3 "2015-09-01T16:05:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Finn\_the\_Dane1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/finn_the_dane1/32/132_2.png) [@Finn\_the\_Dane1](https://techcommunity.softwareag.com/u/Finn_the_Dane1)\
**Post date:** [September 1, 2015, 4:09pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/4 "2015-09-01T16:09:51Z")

</div>

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](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat825mf/syscom/compopt.htm)

---

<div class="post-metadata">

**Author:** ![Tadd\_Yarbrough1](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Tadd\_Yarbrough1](https://techcommunity.softwareag.com/u/Tadd_Yarbrough1)\
**Post date:** [September 1, 2015, 4:26pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/5 "2015-09-01T16:26:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [September 1, 2015, 5:26pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/6 "2015-09-01T17:26:58Z")

</div>

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

```auto
END-DEFINE
OPTIONS PSIGNF=ON
...
```

---

<div class="post-metadata">

**Author:** ![Tadd\_Yarbrough1](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Tadd\_Yarbrough1](https://techcommunity.softwareag.com/u/Tadd_Yarbrough1)\
**Post date:** [September 1, 2015, 7:07pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/7 "2015-09-01T19:07:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:34pm UTC](https://techcommunity.softwareag.com/t/hex-characters-on-mainframe-work-files/183616/8 "2021-04-02T15:34:05Z")

</div>


