IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sign Bit in Ezytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sriram_motamarri
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 11
Location: Chennai

PostPosted: Mon Apr 06, 2009 10:22 pm
Reply with quote

My Ezytrieve Program is to convert some numbers in input file to other

Input file is like below

5508{ 01D

I defined these two fields as
File declaration
Field-1 5 N 0
Field-2 3 N 0

In Program

If Field-1 = 55080
Field-1 = 55095 I want it as 5509E
End-if

In the out file i am getting as 55095.
Please tell me how i can get 5509E
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon Apr 06, 2009 11:20 pm
Reply with quote

Code:
 Num  Neg   Unsigned Plus                                               
 ---  ----  -------- ----                                               
  0   DO }    F0 0   C0 {                                               
  1   D1 J    F1 1   C1 A                                               
  2   D2 K    F2 2   C2 B                                               
  3   D3 L    F3 3   C3 C                                               
  4   D4 M    F4 4   C4 D                                               
  5   D5 N    F5 5   C5 E                                               
  6   D6 O    F6 6   C6 F                                               
  7   D7 P    F7 7   C7 G                                               
  8   D8 Q    F8 8   C8 H                                               
  9   D9 R    F9 9   C9 I   


For math input unsigned numbers are treated the same as plus signed. Usually converting the sign nibble (the left nibble of the right most byte) from F unsigned to C Plus signed is not needed.

Easytrieve does not usually output the plus signed numbers for numeric, unless they are packed or binary (and often not even then). If you really need them converted you may need to test and convert the sign nibble of these numbers by treating them as alpha fields.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Apr 07, 2009 1:10 am
Reply with quote

CA-Easytrieve/Plus Reference Guide wrote:
Signed/Unsigned Rules
.
.
.
2. For non-negative, zoned decimal numbers on the left side of an Assignment statement, CA-Easytrieve/Plus sets an F sign. Otherwise, it manipulates the number in packed decimal format.
3. Packed decimal numbers are manipulated in packed decimal format.

Try this:
Code:
Field-1 5 P 0
Field-2 3 P 0
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
No new posts Identify who, from where, sign on CIC... CICS 1
No new posts How can I close a flat file in Ezytrieve CA Products 3
Search our Forums:

Back to Top