Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to SUBSTR a group variable in a table using REXX/DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to SUBSTR a group variable in a table using REXX/DB2
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: 2360
Location: Israel

PostPosted: Tue Aug 29, 2006 7:22 pm    Post subject:
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    Post subject: thanks i found that myself i have removed that to..
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us