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

How to SUBSTR a group variable in a table using REXX/DB2


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Tue Aug 29, 2006 6:37 pm
Reply with quote

i am coding a REXX routine in which i have to select a variable which is in a group varaible this how the grp variable is

12 BOR-NM-GRP-TXT PIC X(29).
12 BOR-REDFD-NM-TXT REDEFINES BOR-NM-GRP-TXT.
15 BOR-LST-NM PIC X(16).
15 BOR-1ST-NM PIC X(12).
15 BOR-MI-NM PIC X.


i have to select BOR-LST-NM alone in the rexx program

this is the code i have written

SQL1 = "SELECT SUBSTR ('BOR_NM_GRP_TXT',1,16)",
"FROM" db ".lsbor where bor_ssn = "ssn



now when i prepare this select stmt it shows me a -138 sqlcode ...

how should i select this txt

please let me know
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Aug 29, 2006 7:22 pm
Reply with quote

Why did you put quotes around 'BOR_NM_GRP_TXT' ?

O.
Back to top
View user's profile Send private message
vasan_4u

New User


Joined: 28 Jun 2005
Posts: 35
Location: chennai

PostPosted: Tue Aug 29, 2006 7:25 pm
Reply with quote

ofer71 wrote:
Why did you put quotes around 'BOR_NM_GRP_TXT' ?

O.


now the code works fine thanks
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:

Back to Top