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

Advice needed on ISPF/REXX problem with DB2 upgrade


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ozburt

New User


Joined: 05 Nov 2009
Posts: 5
Location: UK

PostPosted: Fri Nov 06, 2009 5:17 pm
Reply with quote

Since migrating from DB2 Version 7 to Version 8 we have had issues with
generating IBM Utility JCL, which is done by performing SQL queries on the DB2 Catalog tables. We believe that the problem lies within the TSO/ISPF Call Attachment Facility (CAF) which is accessed via a REXX assembler macro, DB2ISPF2, but have been unable to identify the cause.

We have updated all the various libraries so that they are V8 compliant and this is reflected in the assembler macro.

The generation of IBM Utility JCL worked in V7 but not in V8.

At first we thought it was due to the increased length of columns in the
DB2 Catalog tables but this was ruled out.

However, further investigation revealed the following errors:

Variable 'NUM_DEP_' is syntactically incorrect

Variable 'SPLIT_RO' is syntactically incorrect

These columns are derived from SYSIBM.SYSTABLES - NUM_DEP_MQTS
and SPLIT_ROWS, both of which are new columns in V8.

In the ISPF manuals it states:

ISPF variable names are 8 characters or less, and consist of alphanumeric characters only. The name must start with an alphabetic character. Rexx stem variables are not supported.

Prior to V8 all columns within the SYSIBM.SYSTABLES are alphanumeric for the first 8 characters with any special characters such as underscore coming after the 8th character.

So it appears that with the introduction of new columns in DB2 Catalog tables in V8 that contain an underscore within the first 8 characters of the column name has an adverse impact on our REXX/ISPF/DB2 routines.

Does anyone know how to get round this problem or has a piece of REXX
code to circumvent this?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Nov 06, 2009 5:46 pm
Reply with quote

Quote:
At first we thought it was due to the increased length of columns in the
DB2 Catalog tables but this was ruled out.

not a db2 issue, rather a misunderstanding of the working of an in house developed tool icon_evil.gif
if somebody inside Your organization had read and understood the attachment posted,
You would not have started the whole thread

Code:
//*The SQL selection parameter has the general form of an         */    00004800
//*interactive SQL query:                                         */    00004900
//*                                                               */    00005000
//*___ SELECT ___ * __________________________ FROM ... ___       */    00005100
//*            !_____ columnname ____________!                    */    00005200
//*            !                 !_ "alias" _!                    */    00005300
//*            !________________ , __________!                    */    00005400
//*                                                               */    00005500
//*where alias is an extension of the SQL syntax for the DB2ISPF2 */    00005600
//*program, and specifies the name in the ISPF table to which the */    00005700
//*DB2 column is to be assigned. If no alias is specified, then the/    00005800
//*column name from the DB2 table (view) is used.                 */    00005900
//*                                                               */    00006000
//*The alias option can be used:                                  */    00006100
//*                                                               */    00006200
//*1      When the DB2 column name is longer than 8 characters.   */    00006300
//*                                                               */    00006400
//*2      When the selected column is not a table (view) column (eg/    00006500
//*      COUNT).                                                  */    00006600
//*                                                               */    00006700
//*3      When the DB2 column name is a reserved ISPF name (eg    */    00006800
//*      LENGTH).                                                 */    00006900


I do not know what You are trying to achieve, but the comment inside the JCL stream speaks for itself

the alias should also be used when column names conflict with the name allowed for ispf variables...

if the code attached was developed inside Your organization please say so
and I will delete it in order to avoid any IP issues
Back to top
View user's profile Send private message
ozburt

New User


Joined: 05 Nov 2009
Posts: 5
Location: UK

PostPosted: Fri Nov 06, 2009 6:12 pm
Reply with quote

Enrico

Sorry if you took offence and great exception at what was my first posting to the forum. I thought the whole purpose of forums of this ilk was to provide advice and get ideas from others on possible solutions or to be guided in the right direction.

It was just a simple request for suggestions/advice on what to do with regard to the REXX code when interfacing with ISPF for variables when it comes across an underscore within the first 8 characters which is rejected by ISPF.

You have recognised that it is not a DB2 issue so that is why it was posted in this forum.

The rexx code was attached as a reference aid (used from DB2 Update journal) but if it meets with your disapproval then by all means remove it.

Hopefully I will get some pointers as I will admit that I am no rexx expert rather than to be made unwelcome.

Regards

Ozburt
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Tue Nov 10, 2009 5:46 am
Reply with quote

Hello,

This looks like an inhouse developed tool. After V8 we also had several problems with REXX and some panels. But nothing of the type as yours. But then it all depends on what catalog tables you are using what you are doing with them, processing using ISPF etc.

I think you are the best person to fix this. It will be easier if you could provide specific details about error and exactly the place in code where it happens. If you can hide your application details and ask specific technical question, you would have a better chance of getting an answer.

My 2 cents.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 10, 2009 6:21 am
Reply with quote

I did not take any offence nor exception...

You did not ask about any advice,
You were complaining about the odd behavior of an in house developed tool
when migrating to a new version of db2 and asking for help in debugging Your tool...

I downloaded the tool source, read it ( or rather read the usage instructions ) ,and posted my findings

... not a db2 issue nor a REXX issue either,
I am going to repeat it ...
a poor understanding of the internals of Your tool
or a poor way of implementing it ( somebody did not read the documentation )
which had as a consequence not using properly the facilities provided by the tool itself.

what was attached was an assembler code which issues a dynamically built
select and with the results of the select fills an ispf table

to fix the error reported there is no need to be a REXX expert because
nowhere in the starting post of this topic there was mention of rexx

You took exception on my comment with the evil emoticon
apart the emoticon what is that You disagree with in my comments ?

I just did what somebody in Your organization should have done in advance ...
reading and understanding how to invoke the tool when the DB2 column names
do not respect the ISPF naming constraints

the fix for the issue looks very clear to me ...
when selecting columns with names that do not follow the ispf rules use the provided alias facility
as explained in the documentation inside the assembler program

that' all ...
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 -> DB2

 


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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top