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

give one example for LOW & HIGH functions in PL/1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
G.S.Sekhar

New User


Joined: 19 Aug 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 5:41 pm
Reply with quote

Hi,

If anyone give explanation and example for LOW & HIGH functions in PL/1. It's so greatful to me. Thanks in advance.
Back to top
View user's profile Send private message
Athanga

New User


Joined: 29 Sep 2005
Posts: 9

PostPosted: Fri Sep 30, 2005 11:13 pm
Reply with quote

HI...

check this ..

let a variable be ABC and you want to initialize with low values or high values then use


ABC = LOW(CSTG(ABC))
ABC = HIGH(CSTG(ABC))

here CSTG menas current storage area of that variable will be taken or you can hard code to how many bytes of that variable need to be initialized.

ie

ABC = LOW(10)
ABC = HIGH(10)


I am not 100% sure..
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Sat Oct 01, 2005 1:27 am
Reply with quote

Hi Sekhar,
LOW and HIGH buitin functions return character that is the lowest and highest respectively of the collating sequence.The returned character is repeated depending upon the length specified.
Example:
NAME = LOW(25);
Say,NAME is declared as CHAR(25) and the lowest value of the collating sequence is BLANK.Now the above statement moves 25 blanks to NAME,ie. NAME is initialized to spaces.
My explanation resembles Athanga's.I am very sure about what I spoke, but I couldn't speak in terms of CSTG.
Hope this helps...
Thanks!
Sridevi.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts DSNTIAUL and DB2 Scalar Functions DB2 17
No new posts Can you give me examples of programs ... CLIST & REXX 22
Search our Forums:

Back to Top