Q
Problem solve Get help with specific problems with your technologies, process and projects.

WRKENVVAR character limit

I use the WRKENVVAR to set the variable CLASSPATH. The issue is that the CLASSPATH has already been filled up. How can I increase the length of the Value Field?

I use the WRKENVVAR to set the variable CLASSPATH. The issue is that the CLASSPATH has already been filled up. How can I increase the length of the Value Field?
I had to call SupportLine for the answer to this one: According to the ADDENVVAR documentation the VALUE parameter supports a maximum of 1024 characters; however, the VALUE blank in the ADDENVVAR and CHGENVVAR commands is only 512 characters long!

What SupportLine said was:

This apparently cannot be done from a command line, it looks like you have to use a CL

program:
 ADDENVVAR ENVVAR('CLASSPATH') +                                             
             VALUE('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+               
             aaaaaaaaaaaaaaaaaa')   

The '+' is required, at which point it should allow you to put in an additional line an unlimited number of times -- up to 1024 characters.

Compile the CL program and call it from a command line. The environment variable will be added, and you can view it using WRKENVVAR. To change it, you will need to update your CL program and run it again.

If your classpath needs to be longer than 1024 characters, you may need to put the classpath in a file and set an environment variable to point to the classpath file. Methods for this will vary somewhat depending on your environment.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your systems management questions fast.

Read this Search400.com Featured Topic: Take control of your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.

Dig Deeper on Systems Management Tools

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close