Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sign Bit in Ezytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Sign Bit in Ezytrieve
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Tue Apr 07, 2009 1:10 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IGZ0040S An invalid separate sign was... kishpra COBOL Programming 13 Sun Aug 02, 2015 2:41 am
No new posts How to modify the value using the sig... Vinay Pushpala PL/I & Assembler 3 Fri Feb 13, 2015 2:10 pm
No new posts SUM FIELDS of ZONED DECIMAL as DISPLA... mrgnndhmk JCL & VSAM 1 Mon Aug 11, 2014 9:16 pm
No new posts Moving sign bit from X variable to 9 seahawk789 COBOL Programming 10 Mon Aug 11, 2014 2:45 am
No new posts Move SIGN NUM to UNSIGN NUM warning m... xpower COBOL Programming 2 Tue Apr 15, 2014 7:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us