Hi Cal, I think only is in Spanish. Perhaps you can contact with Common Europe President (is the author)
Original Message:
Sent: Fri August 23, 2024 11:58 AM
From: Cal Moffitt
Subject: Help Please, is there someone who might be able to answer some advanced ACS macro scripting questions?
I got the PDF and sent the request for the English version also. It does look promising! Thanks!
------------------------------
Cal Moffitt
Original Message:
Sent: Fri August 23, 2024 11:07 AM
From: Greg Cornett
Subject: Help Please, is there someone who might be able to answer some advanced ACS macro scripting questions?
I went through the sign-up page for the 2022 conference so I could try to access the content. Surprisingly, it let me in. There was no link to a video, but there was a PDF of the presentation. It looks very promising! Unfortunately, it is in Spanish and I only speak English. The first page of the PDF, however, said he was preparing an English version and to email him a request for it. I emailed him, and got an auto-response that he is on holiday until early September 2024. If I get a response, I will ask his permission to share it with this group.
Fernando, would you be so kind as to share a direct link to the video?
------------------------------
Greg Cornett
Original Message:
Sent: Fri August 23, 2024 10:54 AM
From: Cal Moffitt
Subject: Help Please, is there someone who might be able to answer some advanced ACS macro scripting questions?
Thank you Fernando, I would love to watch that, but I do not have access. It does not give me a link to the video.
------------------------------
Cal Moffitt
Original Message:
Sent: Fri August 23, 2024 02:35 AM
From: Fernando Plaza
Subject: Help Please, is there someone who might be able to answer some advanced ACS macro scripting questions?
Hi,
if you have access to past COMMON EUROPE presentations, here you can watch Juan Manuel Alcudia session ...
https://commoneuropecongress2022.sched.com/event/zrCW/acs-macros-beyond-the-basics
------------------------------
Fernando Plaza
IBM i System Administrator
CD INVEST
MADRID
Original Message:
Sent: Tue August 20, 2024 02:07 PM
From: Cal Moffitt
Subject: Help Please, is there someone who might be able to answer some advanced ACS macro scripting questions?
The HAScript language seems to be so uncommon that I get crickets at StackOverflow. ChatGPT gives me answers that might work in regular XML, but doesn't work in HAScript. The IBM Host On-Demand Macro Programming Guide is really vague at best.
I am trying to use the <custom> element to run Java to interate over rows of Excel. But I cannot seem to get the syntax right. This is literally the example in the Advanced Programming guide "<custom id="'MyProgram1'" args="'arg1 arg2 arg3'" />".
I keep getting the error message: "Macro: java_script(28): Element type "custom" must be followed by either attribute specifications, ">" or "/>"
It appears I'm putting the Java script in the wrong place.
Can someone please tell me what I'm doing wrong? Any help is very much appreciated!
Thanks!
My code is below:
<HAScript name="java_script" description="" timeout="60000" pausetime="300" promptall="true" blockinput="true" author="Cal.Moffitt" creationdate="Aug 20, 2024, 9:43:02 AM" supressclearevents="false" usevars="true" ignorepauseforenhancedtn="true" delayifnotenhancedtn="0" ignorepausetimeforenhancedtn="true" continueontimeout="false">
<import>
<type class="java.io.File"/>
<type class="java.io.IOException"/>
<type class="java.text.DateFormat"/>
<type class="java.text.SimpleDateFormat"/>
<type class="java.util.Date"/>
<type class="org.apache.poi.openxml4j.exceptions.InvalidFormatException"/>
<type class="org.apache.poi.ss.format.CellDateFormatter"/>
<type class="org.apache.poi.ss.usermodel.Cell"/>
<type class="org.apache.poi.ss.usermodel.DateUtil"/>
<type class="org.apache.poi.ss.usermodel.Row"/>
<type class="org.apache.poi.ss.usermodel.Sheet"/>
<type class="org.apache.poi.ss.usermodel.Workbook"/>
<type class="org.apache.poi.ss.usermodel.WorkbookFactory"/>
<type class="org.apache.poi.xssf.usermodel.XSSFCell"/>
</import>
<screen name="Screen1" entryscreen="true" exitscreen="true" transient="false">
<description >
<oia status="NOTINHIBITED" optional="false" invertmatch="false" />
</description>
<actions>
<custom id="'
public class Testing {
public static void main(String args[]) throws InvalidFormatException, IOException {
Workbook wb = WorkbookFactory.create(new File("Authors.xlsx"));
Sheet firstSheet = wb.getSheetAt(0); // get the first sheet
for (Row row : firstSheet) {
for (Cell cell : row) {
print(cell);
}
System.out.println(""); // to start displaying each row in separate line
}
}
public static void print(Cell cell) {
switch (cell.getCellType()) {
case XSSFCell.CELL_TYPE_STRING:
System.out.printf("%s\t", cell.getRichStringCellValue().getString());
break;
case XSSFCell.CELL_TYPE_NUMERIC:
System.out.printf("%s\t", cell.getNumericCellValue());
default:
break;
}
}
}
'" args="" />
</actions>
<nextscreens timeout="0" >
</nextscreens>
</screen>
</HAScript>
Hello @Michael Swenson, is this something you could possibly assist with? Please sir?
------------------------------
Cal Moffitt
------------------------------