Our manager, who is not an HLASM programmer, asked ChatGPT to create an assembler program to move data from one location to another. He then had to ask it to do it for z/OS. The response was:
For z/OS assembly language, you can use the BALR (Branch and Link Register) instruction to move data from one memory address to another. Here's an example program that demonstrates how to perform the data transfer:
USING *,12
START EQU *
LR R1,R3 Load source address into R1
LR R2,R4 Load destination address into R2
L R5,0(R1) Load data from source address
ST R5,0(R2) Store data to destination address
.
.
.
(Rest of the program)
.
.
.
END START
I critiqued the results and in response, a tech support person said, well, I'm sure it could learn quicker than I could. My response was:
* ChatGpt has the limitation that it doesn't have a mentor that takes the time to say, that's a good try but this is better. It is limited to what is published out there and lacking comments, doesn't have a good way to evaluate which are the best techniques. So it guesses just like a human.
* And I personally think you could learn to be effective in assembler faster than ChatGPT, because you'd have a mentor and a place to test your code. ChatGPT obviously doesn't assemble its code and test it.
If you isolate ChatGPT (or any AI) to only consult code samples from sources that have been vetted to be good (for some value of good) and if it accepted and remembered criticism without getting sulky, perhaps it could learn to present acceptable HLASM code.
My concern is that ChapGPT will teach everyone the System 360 (or at best S/370) instruction set (because of the volume of code and textbooks available) instead of consulting Ehrmann's (and others) excellent SHARE presentations.
Gary Weinhold
Senior Application Architect
DATAKINETICS | Data Performance & Optimization
Phone:
+1.613.523.5500 x216
Email:
wein...@dkl.com
Visit us online at
www.DKL.com
E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.
________________________________
From: IBM Mainframe Assembler List <
ASSEMBL...@LISTSERV.UGA.EDU> on behalf of Wendell Lovewell <
000009624390d78...@LISTSERV.UGA.EDU>
Sent: June 2, 2023 13:48
To:
ASSEMBL...@LISTSERV.UGA.EDU <
ASSEMBL...@LISTSERV.UGA.EDU>
Subject: Re: ChatGPT "knows" HLASM