Code: Select all
fd = open('/mwalter/urlUSed.txt':
O_WRONLY+O_CREAT+O_TRUNC+O_APPEND+O_CODEPAGE :
S_IRGRP + S_IWGRP + S_IXGRP :
819);
callp close(fd);
oFlag = O_WRONLY+O_APPEND+O_TEXTDATA;
// Open the file and write the URL to the file.
fd = open('/mwalter/urlUsed.txt':OFlag);
if fd > 0;
callp write(fd:%addr(theUrl):%len(%trimr(theUrl)));
callp close(fd);
endif;
Code: Select all
inboundFile = '/P44/Inbound/' + %trim(title) + '_' +
%char(%date():*iso0) + '_' +
%char(%time():*hms0) + '.json';
fd = open(inboundFile:
O_WRONLY+O_CREAT+O_TRUNC+O_APPEND+O_CODEPAGE :
S_IRGRP + S_IWGRP + S_IXGRP :
819);
callp close(fd);
oFlag = O_WRONLY+O_APPEND+O_TEXTDATA;
// Open the file and write the URL to the file.
fd = open(inboundFile:OFlag);
if fd > 0;
jsonData = %trim(jsonData) + 'CRLF';
myint = write(fd:%addr(jsonData):%len(%trim(jsonData)));
// 1208);
callp close(fd);
EXEC SQL
INSERT INTO Wserlgfl
VALUES(CURRENT TIMESTAMP,
'write',
'Write Completed');
else;
EXEC SQL
INSERT INTO Wserlgfl
VALUES(CURRENT TIMESTAMP,
'write',
'Write failed. FD = ' || CHAR(myint));
endif;
Thanks,