MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COMP-3 display on ISPF panel

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Sat Sep 10, 2005 11:09 am    Post subject: COMP-3 display on ISPF panel Reply with quote

Hi all,

I need to display a COMP-3 variable on the ISPF panel. Can any one let me know how to go about it.

The variable is being read from a seq file. i just need to display it on the ISPF panel. when i tried doing it. its displaying some junk values.

Thanks,
Tattva
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Sep 10, 2005 11:53 am    Post subject: Reply with quote

It is difficult to tell you what is wrong since you haven't told us what you've tried. How did you VDEFINE the variable?
Back to top
View user's profile Send private message Visit poster's website
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Sat Sep 10, 2005 3:06 pm    Post subject: Reply with quote

tattva,
COMP-3 is Packed Decimal. Go to File-Aid and view it in 'formatted' mode with a copybook. Are you new to mainfarme? these are not junk values or as semiqeezer posted I too don't understand the question. Thanks
Back to top
View user's profile Send private message
tattva
Beginner


Joined: 02 Feb 2005
Posts: 97
Topics: 36

PostPosted: Wed Sep 14, 2005 11:40 am    Post subject: Reply with quote

Hi all,

Sorry for the delay in replying...

Let me state my requirement with an example:-

Ex :- X = 1234 ( in COMP-3 format)

My REXX code should read this and display 1234( normal format) on the ISPF panel.

Suresh,

I do know COMP-3 is Packed decimal. Smile

Would be great if anyone can provide a solution to this.

Thanks,
tattva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Sep 14, 2005 12:02 pm    Post subject: Reply with quote

tattva,

Try this

Code:

/* REXX  CONVERT PACKED DECIMAL TO NUMBER */   
PARSE ARG PACK_NUM                             
HEX_NUM  = C2X(PACK_NUM)                       
SIGN     = RIGHT(HEX_NUM,1)                   
NUMBER   = LEFT(HEX_NUM,LENGTH(HEX_NUM)-1)     
IF SIGN = 'D' THEN                             
   RETURN '-'| |NUMBER                         
ELSE                                           
   RETURN NUMBER                               


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Sep 14, 2005 8:35 pm    Post subject: Reply with quote

My point was that when you VDEFINE the variable, use PACK format. See the link I gave above. Unless, as Kolusu assumed, you are doing this from Rexx in which case you either need to write the converson yourself as he did or call a small program to do the ISPF work (vdefines, display, etc) for you.

VDEFINE is not available in Rexx and CLIST because the ISPF function pool IS the rexx or clist variable pool.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group