Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

CA Products :: READ A PACKED "NEGATIVE" FIELD WITH EASYTRIEVE

$
0
0
Author: jdesouza
Subject: READ A PACKED "NEGATIVE" FIELD WITH EASYTRIEVE
Posted: Tue May 02, 2017 11:43 pm (GMT 5.5)

Hi experts;

I´m a newbee in Easytrieve and have a responsability to convert lots of data in datasets (obviously icon_rolleyes.gif ) in CSV format, but i have trouble with packed fields signed. Let me show an sample job:

Code:

//JOBCARD
//*----------------------------------------------------------------
//*-- EZTPLUS PROC CALLING "EZTPA00"
//*----------------------------------------------------------------
//STEP02   EXEC EZTPLUS,H=YES,DV=CYL,N=80
//SYSPRINT DD SYSOUT=Y
//SYSIN    DD *
LIST OFF
PARM LIST NOPARM
FILE INPUT
IN-PRECO-ITEM           1  7   P  2
*
FILE OUTPUT
OUT-PRECO-ITEM          1  13   N  2
*
JOB
OUT-PRECO-ITEM = IN-PRECO-ITEM
SEPARATOR         = ';'
*
PUT OUTPUT
//INPUT        DD DSN=IR.INPUT.FILE,DISP=SHR
//OUTPUT     DD DSN=IR.OUTPUT.FILE,DISP=SHR


My desire is read the number "-110803282" from this packed "hex on" register.

Code:

ORIGINAL NUMBER : "-110803282"

HEX ON
>....5..
 0010022
 001838D
 _____________




But, the output results is "000011080328K;"
It´s translating "2D" to "K"...

Am I doing something wrong ???


Viewing all articles
Browse latest Browse all 8500

Trending Articles