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

Author Message
Ashokn

New User

Joined: 25 Jun 2008
Posts: 13
Location: Bangalooru

 Posted: Thu Jun 26, 2008 2:24 pm    Post subject: Declaration & Initialization of HEX in PL/1 Hi, How to declare & initialize a hexadecimal value in pl/1? For example: In some language:- DEFINE ERRHEX 5 H VALUE ='1002' ; what will be the equivalent of above statement in PL/1? Thanks in adv...

Garry Carroll

Senior Member

Joined: 08 May 2006
Posts: 1005
Location: Dublin, Ireland / Edinburgh, Scotland

Posted: Thu Jun 26, 2008 3:02 pm    Post subject:

You can code:

 Code: DCL    HEX_FIELD    CHAR(1) INIT('05'X);

Garry
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

 Posted: Thu Jun 26, 2008 8:19 pm    Post subject: Hello, I'm may be misunderstanding something, but how might "VALUE ='1002'" = "INIT('05'X)"?
Garry Carroll

Senior Member

Joined: 08 May 2006
Posts: 1005
Location: Dublin, Ireland / Edinburgh, Scotland

Posted: Thu Jun 26, 2008 8:33 pm    Post subject:

Sorry,

Read the 5 in the post incorrectly.

 Code: DCL  HEX_FIELD  CHAR(2) INIT('1002'X);

or, for array,
 Code: DCL HEX_FIELD(5) CHAR(2) INIT((5)'1002'X);

Garry.
dick scherrer

Site Director

Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

Posted: Thu Jun 26, 2008 8:51 pm    Post subject: Reply to: Declaration & Initialization of HEX in PL/1

 Quote: Sorry,
Not a problem

Just checking to see what i might have missed. . .

Thanx for the clarification

d
Ashokn

New User

Joined: 25 Jun 2008
Posts: 13
Location: Bangalooru

Posted: Fri Jun 27, 2008 9:40 am    Post subject: Declaration & Initialization of HEX in PL/1

==============================================
Garry Carroll wrote:
Sorry,

Read the 5 in the post incorrectly.

 Code: DCL  HEX_FIELD  CHAR(2) INIT('1002'X);

or, for array,
 Code: DCL HEX_FIELD(5) CHAR(2) INIT((5)'1002'X);

Garry.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm Declaration of varchar in cobol s.saranya srinivasan COBOL Programming 6 Fri Sep 25, 2015 11:43 am COBOL File Declaration for RECFM=VBS ... thinkmsk COBOL Programming 6 Fri Apr 03, 2015 3:31 pm LOAD card with and without column dec... dilpreet DB2 1 Tue Aug 19, 2014 2:24 am VSAM File Declaration for PD fields selvaraja CA Products 2 Wed Nov 27, 2013 5:58 am

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