Solved

Convert user input to upper case

Posted on 1998-11-04
6
8,816 Views
Last Modified: 2009-07-29
I have Microfocus Cobol as a front-end to my Oracle7 database.

From my Cobol programs, I accept both the Oracle username and Password from the user. I use these 2 entries to connect to the the Oracle database (via embedded SQL). For some reason, my connection to the Oracle database doesn't work well if the entries (that is the Oracle username and password) are in lowercase. I therefore would like to convert these 2 entries from the user into uppercase before using them to connect to my oracle database.

Is there an easy way of converting my user entries into uppercase after accepting them from the user? I will then use these uppercase entries to connect to my Oracle database.
0
Comment
Question by:rmission
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:clydes
ID: 1082424
I am not sure how you are connecting to the database.  Are you using SQL*net or some other method.  If you are accepting the username and password in sql then you can use the upper function to convert the input to upper.
username = upper(userinput)
this will return upper case to the field.  
If you are doing it in microsoft focus I am sure that they have a built in function to convert to uppercase
0
 

Author Comment

by:rmission
ID: 1082425
clydes,

Thanks for your comment. I am connecting to my Oracle7  database from within my Microfocus Cobol programs via SQL*net

My problem is finding the right Microfocus Cobol function to do the conversion from lowercase characters to uppercase. I have searched thru the numerous Microfocus Cobol manuals, but with no luck so far. I will continue to look at the manuals.

However, if anyone can quickly give me the correct function to convert text into uppercase in Microfocus Cobol, I will dearly appreciate that.

0
 
LVL 1

Expert Comment

by:vulkanr
ID: 1082426
i am not sure your question is posted under the right category.
however, try to check your NLS_LANG enviroment variable.
maybe it is not set correctly (to the database characterset), and this is the reason why you cant connect with lowercase letters.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Expert Comment

by:clydes
ID: 1082427
I think if you look at your functions in Microfocus Cobol you should find a function that converts lower case to upper case.  You might check to see if there is a function called to_upper, upper, or ucase.  these are common names for functions used to convert from lower case to upper case.  If not I am sure that there is a function that will do it.  should be a function because it passes back the converted information.
Good luck.
0
 

Author Comment

by:rmission
ID: 1082428
vulcanr,

Maybe you're right, I maybe posting my question in the wrong  category. (But, where can I post my question then?).

Anyway, can you give me a bit more detail. For instance, how do I enable the evironment variable, NLS_LANG and where do I enable it.

A bit of extra information:
My Oracle7 database is running on a Novell Netware 3.11 Server.

Clydes,

Thanks again. I will surely look again (in the manuals) for functions with names like you specified.

Cheers
0
 

Accepted Solution

by:
pinnekaf earned 50 total points
ID: 1082429
Read your manuals !

Micro Focus Cobol Language Reference
  Intrinsic Functions

  GENERAL FORMAT:
     FUNCTION UPPER-CASE(argument)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question