Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 2 Wed Mar 22, 2017 7:46 am
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us