-
QCMDEXC CPF0006
Ich finde den Grund des Fehlers nicht, trotz der Recherche in diesem Forum.
Den kompletten Befehl kann ich auf der AS/400 absetzen,
aber im Programm tritt ein Fehler auf.
CRTSNDMDAV ACCOUNT(AS400)
TO('bernhard.tarkusch@gmail.com')
SUBJECT('Pgm-Fehlermeldung')
TEXT('Fehler(0013) im Programm
aufgetreten!')
Kann mir jemand einen Tip geben?
Code:
DQCMDEXEC PR EXTPGM('QCMDEXC')
D CMDTXT 1000A CONST OPTIONS(*VARSIZE)
D CMDLEN 15P 5 CONST
D*
D CMDTXT S 1000A
D CMDLEN S 15P 5
D HK C Const('''') Hochkomma
D $$TEXT S 512A
****************************************************************
* Hauptprogramm *MAIN
****************************************************************
/Free
$$Text = 'Fehler(0013) im Programm aufgetreten!';
CMDTXT = 'CRTSNDMDAV ACCOUNT(AS400) TO(' + HK +
'bernhard.tarkusch@gmail.com' + HK +
') SUBJECT(' + HK + 'Pgm-Fehlermeldung' + HK +
') TEXT(' + HK + '@TXT' + HK + ')';
CMDTXT = %replace(%Trimr($$TEXT):CMDTXT:%scan('@TXT':CMDTXT):4);
MONITOR;
QCMDEXEC(CMDTXT:CMDLEN);
ON-ERROR *ALL;
Msgbox(PGMSDS);
ENDMON;
*INLR= *ON;
Return;
Gruß und Dank im Voraus
Tarki
-
Du mußt CMDLEN vor dem Aufruf auf einen geeigneten Wert setzen!
-
thx,
das habe ich wieder völlig übersehen.
-
 Zitat von tarkusch
CMDTXT = %replace(%Trimr($$TEXT):CMDTXT:%scan('@TXT':CMDTXT ):4);
Just out of interest, you want to send an email describing the error when a program crashes, right? You have the text which is 512A long, but you are only sending 4 characters of that text. Is that intentional? If not, shouldn't that be as follows?
Code:
CMDTXT = %replace(%Trimr($$TEXT):CMDTXT:%scan('@TXT':CMDTXT):%len(%Trimr($$TEXT)) );
-
 Zitat von kitvb1
Just out of interest, you want to send an email describing the error when a program crashes, right? You have the text which is 512A long, but you are only sending 4 characters of that text. Is that intentional? If not, shouldn't that be as follows?
Code:
CMDTXT = %replace(%Trimr($$TEXT):CMDTXT:%scan('@TXT':CMDTXT):%len(%Trimr($$TEXT)) );
Yes, i want to send an email with the error.
But i want to replace @TXT with the $$TEXT-String.
I must give the length of @txt and that is four, or?
-
Ja, der letzte Parameter (4) ist die Anzahl der Zeichen, die Du ersetzen möchtest.
Yes, the last parameter (4) is the number of characters you want to replace.
Similar Threads
-
By philsturm in forum NEWSboard Programmierung
Antworten: 8
Letzter Beitrag: 26-10-12, 12:37
-
By muadeep in forum NEWSboard Programmierung
Antworten: 9
Letzter Beitrag: 24-06-06, 23:59
-
By flytokiwi in forum IBM i Hauptforum
Antworten: 3
Letzter Beitrag: 29-03-06, 13:49
-
By Lichtblitz in forum IBM i Hauptforum
Antworten: 2
Letzter Beitrag: 25-07-05, 12:44
-
By Freezer in forum IBM i Hauptforum
Antworten: 8
Letzter Beitrag: 02-12-04, 13:38
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks