Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
EnjoyMF

New User

Joined: 27 May 2005
Posts: 88

 Posted: Wed Jan 11, 2006 11:26 am    Post subject: figurative constant in if condition 01 empcode value x(8) **************************** move zeros to empcode Or move '00000000' to empcode If empcode = zero/zeros Will this work, can the fiurative constant be used for checking the Conditons of an alphanumeric operation , in the IBm maunal it is given as when we move zeros to an alphanemeric item then alphanumeric zero will be moved, what is alphanumeric zero ************************************************************ 2nd Question 01 empno value x(8) How to check the if condition for both spaces OR zeros Some times from the screen the the data comes as 00000000 Can i use the below if condition if empno = Spaces or Zeros Cheers Chaitanya

gowtham_1982
Warnings : 1

Active User

Joined: 02 Dec 2005
Posts: 109

Posted: Wed Jan 11, 2006 11:35 am    Post subject: Re: figurative constant in if condition

 EnjoyMF wrote: 01 empcode value x(8) **************************** move zeros to empcode Or move '00000000' to empcode If empcode = zero/zeros Will this work, can the fiurative constant be used for checking the Conditons of an alphanumeric operation , in the IBm maunal it is given as when we move zeros to an alphanemeric item then alphanumeric zero will be moved, what is alphanumeric zero ************************************************************ 2nd Question 01 empno value x(8) How to check the if condition for both spaces OR zeros Some times from the screen the the data comes as 00000000 Can i use the below if condition if empno = Spaces or Zeros Cheers Chaitanya

hai Chaitanya,

i don't think we can enable this feature as i think we can use logical operators only with respect to conditional statements.

yeah we can use this check and this code will be fine.

corrections welcomed...

gowtham
Rupesh.Kothari

Member of the Month

Joined: 27 Apr 2005
Posts: 464

Posted: Wed Jan 11, 2006 11:48 am    Post subject: Re: figurative constant in if condition

HI,

 Quote: 01 empcode value x(8) **************************** move zeros to empcode Or move '00000000' to empcode If empcode = zero/zeros Will this work, can the fiurative constant be used for checking the Conditons of an alphanumeric operation ,

Yes it will work Fine.

Regards
Rupesh
DavidatK

Active Member

Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

Posted: Thu Jan 12, 2006 5:56 am    Post subject: Re: figurative constant in if condition

Hello EnjoyMF,

 Quote: 01 empcode value x(8) **************************** move zeros to empcode Or move '00000000' to empcode If empcode = zero/zeros Will this work, can the fiurative constant be used for checking the Conditons of an alphanumeric operation , in the IBm maunal it is given as when we move zeros to an alphanemeric item then alphanumeric zero will be moved, what is alphanumeric zero

In a PIC X defined field, the characters are stored as USAGE DISPLAY where 'A' = hex x'C1', 'B' = x'C2' etc. Numerics are stored the same way. '0' = x'F0', '1' = x'F1' etc. So, if you move zeros to emplcode, you store an alphanumeric zero, or x'F0F0F0F0F0F0F0F0' NOT x'0000000000000000'. For this you would have to move LOW-VALUES to empcode.

Let me know if this is not clear.
nikyojin

New User

Joined: 05 Oct 2005
Posts: 94

Posted: Thu Jan 12, 2006 9:30 am    Post subject: Re: figurative constant in if condition

Hi DavidatK,
 Quote: In a PIC X defined field, the characters are stored as USAGE DISPLAY where 'A' = hex x'C1', 'B' = x'C2' etc. Numerics are stored the same way. '0' = x'F0', '1' = x'F1' etc. So, if you move zeros to emplcode, you store an alphanumeric zero, or x'F0F0F0F0F0F0F0F0' NOT x'0000000000000000'

I am somewhat confused. Does this explanation indicate in a field declared as PIC 9 moving zeros will display the hex value o/p as x'0000000000000000'.Pls inform me regarding this.

Regards,
Nikhil .S.
DavidatK

Active Member

Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

Posted: Thu Jan 12, 2006 9:53 pm    Post subject: Re: figurative constant in if condition

Hi nikyojin

 Quote: I am somewhat confused. Does this explanation indicate in a field declared as PIC 9 moving zeros will display the hex value o/p as x'0000000000000000'.Pls inform me regarding this.

My apologies, I didn?t mean to confuse. A move of ?zero? to PIC 9 will also result in x?F0F0F0F0F0F0F0F0?.

The previous question answered was addressing what was meant by ?alphanumeric zero?. I wanted to clarify that a move of ?zero? to PIC X resulted in x?F0F0F0F0F0F0F0F0?, and not x?0000000000000000? (binary zero).

Sorry for the confusion,

Dave
nikyojin

New User

Joined: 05 Oct 2005
Posts: 94

 Posted: Fri Jan 13, 2006 8:52 am    Post subject: Re: figurative constant in if condition Hi Dave, Thanks for the clarification. Regards, Nikhil .S.
EnjoyMF

New User

Joined: 27 May 2005
Posts: 88

 Posted: Tue Jan 17, 2006 5:47 pm    Post subject: Hi DavidatK/nikyojin Thanks for the reply but i have a doubt in case of move zeros to alphanumeric item will this work If empcode = zero/zeros or should we give as if empcode = low-values if possible can u plz give some examples in ur explanation thanks Chaitanya
sbalajibe

New User

Joined: 15 Aug 2005
Posts: 62

 Posted: Wed Jan 18, 2006 11:01 am    Post subject: Hi EnjoyMF, eg : 01 a pic x(2) . 01 b pic 9(2). if u move zeros to both a will contain alphanumeric 0 ie'00' and b will contain 00 and u can use the same for checking in condition also thanks balaji
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us