Skip to content

Commit

Permalink
1.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoehr committed Dec 12, 2017
1 parent b60fa90 commit 340b8b9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,4 @@ source.reference.sblim-cim-client2-HEAD.jar=../../../sblim/Checkout/jsr48-client
source.reference.tn5250j.jar=/home/jax/work/TN5250J/Checkout/tn5250j/src
src.dir=src
test.src.dir=test
ublu.version=1.1.8+
ublu.version=1.1.9
50 changes: 33 additions & 17 deletions src/ublu/command/CmdUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
*/
package ublu.command;

import com.ibm.as400.access.AS400SecurityException;
import com.ibm.as400.access.ErrorCompletingRequestException;
import com.ibm.as400.access.ObjectDoesNotExistException;
import com.ibm.as400.access.RequestNotSupportedException;
import java.io.IOException;
import java.sql.SQLException;
import ublu.Ublu;
import ublu.util.ArgArray;
import ublu.util.Functor;
Expand All @@ -47,7 +53,7 @@ public class CmdUsage extends Command {
"\tIf no command is present, interprets input until EOF or the 'bye' command is encountered."};

{
setNameAndDescription("help or usage", "/0 [[--,-cmd ~@{commandname}] | [-all] | [-version]] [-linelen ~@{optional_line_length}] : display usage and help message");
setNameAndDescription("help or usage", "/0 [-to datasink] [[--,-cmd ~@{commandname}] | [-all] | [-version]] [-linelen ~@{optional_line_length}] : display usage and help message");
}

private int linelength;
Expand Down Expand Up @@ -94,10 +100,13 @@ public ArgArray cmd(ArgArray args) {
while (args.hasDashCommand()) {
String dashCommand = args.parseDashCommand();
switch (dashCommand) {
case "-to":
setDataDestfromArgArray(args);
break;
case "-all":
longmsg = true;
break;
case "--":
case "--":
case "-cmd":
cmdName = args.nextMaybeQuotationTuplePopString();
break;
Expand All @@ -113,24 +122,31 @@ public ArgArray cmd(ArgArray args) {
}
if (havingUnknownDashCommand()) {
setCommandResult(COMMANDRESULT.FAILURE);
} else if (cmdName == null) {
getInterpreter().outputln(usageMessage(getInterpreter().getCmdMap(), longmsg));
} else if (cmdName.equals("version")) {
getInterpreter().outputln(Ublu.startupMessage());
} else {
CommandInterface c = getInterpreter().getCmd(getInterpreter(), cmdName);
if (c != null) {
if (c instanceof Command) {
Command command = Command.class.cast(c);
getInterpreter().outputln(formatSingleCommand(command));
}
} else {
Functor f = getInterpreter().getFunctor(cmdName);
if (f != null) {
getInterpreter().outputln(Utils.breakLines(cmdName + " " + f.toString(), linelength, 0, 0));
try {
if (cmdName == null) {
put(usageMessage(getInterpreter().getCmdMap(), longmsg));
} else if (cmdName.equals("version")) {
put(Ublu.startupMessage());
} else {
getInterpreter().outputln("No such command or functor: " + cmdName);
CommandInterface c = getInterpreter().getCmd(getInterpreter(), cmdName);
if (c != null) {
if (c instanceof Command) {
Command command = Command.class.cast(c);
put(formatSingleCommand(command));
}
} else {
Functor f = getInterpreter().getFunctor(cmdName);
if (f != null) {
put(Utils.breakLines(cmdName + " " + f.toString(), linelength, 0, 0));
} else {
put("No such command or functor: " + cmdName);
}
}
}
} catch (AS400SecurityException | ErrorCompletingRequestException | IOException | InterruptedException | ObjectDoesNotExistException | RequestNotSupportedException | SQLException ex) {
getLogger().log(Level.SEVERE, "Exception putting usage in {0} {1}", new Object[]{getNameAndDescription(), ex});
setCommandResult(COMMANDRESULT.FAILURE);
}
}
return args;
Expand Down
23 changes: 12 additions & 11 deletions userdoc/ubluref.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"Documenting usage of Ublu which is an extensible object-disoriented interpretive language for midrange and mainframe remote system programming"
name="description">
<meta http-equiv="Last-Modified" content=
"Mon, 6 Nov 2017 03:57:53 UTC">
"Tue, 12 Dec 2017 02:09:35 UTC">
<meta http-equiv="content-type" content=
"text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="ublujedit.css">
Expand Down Expand Up @@ -63,7 +63,7 @@ <h1 align="center"><font color=

<p>Author: Jack J. Woehr<br>
Original date: 2013-07-11<br>
Last edit: 2017-11-05</p>
Last edit: 2017-12-12</p>

<pre>
Copyright (c) 2015, Absolute Performance, Inc.
Expand Down Expand Up @@ -1245,22 +1245,23 @@ <h2><a name="Invocation" id="Invocation"></a>Invocation</h2>

<blockquote>
<pre>
Ublu 1.1.7 build of 2017-07-05 15:43:42
Ublu 1.1.9 build of 2017-12-11 19:05:23
Author: Jack J. Woehr.
Copyright 2015, Absolute Performance, Inc., http://www.absolute-performance.com
Copyright 2017, Jack J. Woehr, http://www.softwoehr.com
All Rights Reserved
Ublu is Open Source Software under the BSD 2-clause license.
THERE IS NO WARRANTY and NO GUARANTEE OF CORRECTNESS NOR APPLICABILITY.
***
Running under Java 1.8.0_152
Ublu utilizes the following open source projects:
IBM Toolbox for Java:
Open Source Software, JTOpen 9.3, codebase 5770-SS1 V7R3M0.00 built=20170320 @T2
Supports JDBC version 3.0
Toolbox driver version 11.3
Open Source Software, JTOpen 9.4, codebase 5770-SS1 V7R3M0.00 built=20171018 @V5
Supports JDBC version 4.0
Toolbox driver version 11.4
---
Postgresql PostgreSQL 9.4.1208.jre6
Copyright (c) 1997-2011, PostgreSQL Global Development Group
Postgresql JDBC Driver - JDBC 4.1 42.1.4.jre7 (42.1)
Copyright (c) 1997, PostgreSQL Global Development Group
All rights reserved http://www.postgresql.org
---
tn5250j http://tn5250j.sourceforge.net/
Expand Down Expand Up @@ -9832,9 +9833,9 @@ <h4><a name="help" id="help"></a><tt>help</tt>


<blockquote>
<p><tt>/0 [[--,-cmd commandname] | [-all] | [-version]]
[-linelen ~@{optional_line_length}] : display usage and help
message</tt><br>
<p><code>/0 [-to datasink] [[--,-cmd ~@{commandname}] | [-all]
| [-version]] [-linelen ~@{optional_line_length}] : display
usage and help message</code>
</p>


Expand Down

0 comments on commit 340b8b9

Please sign in to comment.