Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
926 Posts
ACCEPTED ANSWER

Pinned topic Java API Script Issue: SCBC111I DSN/FILE name length greater than 1024 CCOD

‏2012-11-15T14:03:24Z |
I am trying to use the Connect Direct Java API to run a process on a Solaris server that will copy a file from an OS390 mainframe down to the Solaris server.

I am creating the node and executing the job with the following code

public boolean GetFile(String nodeName, String user, String password, String protocol) throws Exception {
Node cdNode = new Node(nodeName, user, password.toCharArray(), protocol);
MediatorEnum submitResults = cdNode.execute("submit maxdelay=UNLIMITED", GetScript(password));

while(submitResults.hasMoreElements()) {
CDProcess processData = (CDProcess)submitResults.getNextElement();
String result = " Process Name=" + processData.getProcessName() +
" Number=" + processData.getProcessNumber() +
" Queue=" + processData.getQueue();
System.out.println(result);
}
}

private String GetScript(String password) {
StringBuffer process = new StringBuffer();
process.append("SGETP1 PROCESS SNODE=PGHP SNODEID=(pq17952," + password + ")\r\n");
process.append("STEP10 COPY FROM (DSN=PWRPCPB.N.GDG.TIERII(0) SNODE) ");
process.append("TO (FILE=/export/home/pp64642/ConnDirEx/test.dat)\r\n");
process.append("PEND");
System.out.println(process.toString());
return process.toString();
}

Then, when I try to run the code on the Solaris server I get the following output

run:
java Starting execution
java SGETP1 PROCESS SNODE=PGHP SNODEID=(pq17952,mypassword)
java STEP10 COPY FROM (DSN=PWRPCPB.N.GDG.TIERII(0) SNODE) TO (FILE=/export/home/pp64642/ConnDirEx/test.dat)
java PEND
java Process Name= Number=0 Queue=
java MsgException
java Connect:Direct Node detected error.
java SCBC111I DSN/FILE name length greater than 1024 CCOD=8 FDBK=0
java Completing execution

Any advice?