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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
Search our Forums:

Back to Top