DATEADJ to ReadMe & Misc
This commit is contained in:
Vendored
+74
@@ -0,0 +1,74 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Create RPGLE Program",
|
||||||
|
"command": "CRTBNDRPG PGM(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTCCSID(*JOB)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile",
|
||||||
|
"extensions": [
|
||||||
|
"RPGLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Create RPGLE Module",
|
||||||
|
"command": "CRTRPGMOD MODULE(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE) TGTCCSID(*JOB)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile",
|
||||||
|
"extensions": [
|
||||||
|
"RPGLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Create SQLRPGLE Program",
|
||||||
|
"command": "CRTSQLRPGI OBJ(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE) CLOSQLCSR(*ENDMOD) CVTCCSID(*JOB) COMPILEOPT('TGTCCSID(*JOB)') RPGPPOPT(*LVL2)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile",
|
||||||
|
"extensions": [
|
||||||
|
"SQLRPGLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Create SQLRPGLE Module",
|
||||||
|
"command": "CRTSQLRPGI OBJ(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OBJTYPE(*MODULE) OPTION(*EVENTF) DBGVIEW(*SOURCE) CLOSQLCSR(*ENDMOD) CVTCCSID(*JOB) COMPILEOPT('TGTCCSID(*JOB)') RPGPPOPT(*LVL2)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile",
|
||||||
|
"extensions": [
|
||||||
|
"SQLRPGLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extensions": [
|
||||||
|
"CLP",
|
||||||
|
"CLLE"
|
||||||
|
],
|
||||||
|
"name": "Create Bound CL Program",
|
||||||
|
"command": "CRTBNDCL PGM(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF) DBGVIEW(*SOURCE)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extensions": [
|
||||||
|
"cmd"
|
||||||
|
],
|
||||||
|
"name": "Create Command",
|
||||||
|
"command": "CRTCMD CMD(&CURLIB/&NAME) PGM(&CURLIB/&NAME) SRCSTMF('&RELATIVEPATH') OPTION(*EVENTF)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"extensions": [
|
||||||
|
"SQL",
|
||||||
|
"TABLE",
|
||||||
|
"VIEW",
|
||||||
|
"SQLPRC",
|
||||||
|
"SQLUDF",
|
||||||
|
"SQLUDT",
|
||||||
|
"SQLTRG",
|
||||||
|
"SQLALIAS",
|
||||||
|
"SQLSEQ"
|
||||||
|
],
|
||||||
|
"name": "Run SQL Statements (RUNSQLSTM)",
|
||||||
|
"command": "RUNSQLSTM SRCSTMF('&FULLPATH') COMMIT(*NONE) NAMING(*SQL)",
|
||||||
|
"deployFirst": true,
|
||||||
|
"environment": "ile"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -60,6 +60,10 @@ Many shops are still using 5250 "green screen" applications and these need to be
|
|||||||
|
|
||||||
A service program to add 1 to an alpha-numeric string of any length.
|
A service program to add 1 to an alpha-numeric string of any length.
|
||||||
|
|
||||||
|
## DATEADJ
|
||||||
|
|
||||||
|
A command to add or subtract from a date in a CL program
|
||||||
|
|
||||||
## DATE_UDF
|
## DATE_UDF
|
||||||
|
|
||||||
SQL User Defined Functions to convert legacy dates to true dates. Written in RPG.
|
SQL User Defined Functions to convert legacy dates to true dates. Written in RPG.
|
||||||
|
|||||||
@@ -20,6 +20,10 @@
|
|||||||
// input and output, but it doesn't have to be the same memory
|
// input and output, but it doesn't have to be the same memory
|
||||||
// in the caller. Use copy member USAdrValDS.
|
// in the caller. Use copy member USAdrValDS.
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
// 04/2024 LENNON
|
||||||
|
// Change to HTTPS
|
||||||
|
// Provide password, even though it currently seems to be ignored.
|
||||||
|
//====================================================================
|
||||||
|
|
||||||
ctl-opt
|
ctl-opt
|
||||||
nomain
|
nomain
|
||||||
@@ -35,7 +39,10 @@ ctl-opt
|
|||||||
// === Data area containing your USPS supplied User id. ==============
|
// === Data area containing your USPS supplied User id. ==============
|
||||||
// (The USPS supplied USER ID length is not clear, so I made it
|
// (The USPS supplied USER ID length is not clear, so I made it
|
||||||
// longer than the 12-char one supplied to me..)
|
// longer than the 12-char one supplied to me..)
|
||||||
dcl-ds USPS_ID dtaara len(20) qualified;
|
// Ditto for password, though password seems to be ignored.
|
||||||
|
dcl-ds USPS_ID dtaara len(20) qualified;
|
||||||
|
end-ds;
|
||||||
|
dcl-ds USPS_PWD dtaara len(20) qualified;
|
||||||
end-ds;
|
end-ds;
|
||||||
|
|
||||||
//=== USAdrVal =======================================================
|
//=== USAdrVal =======================================================
|
||||||
@@ -54,20 +61,24 @@ dcl-proc USAdrVal export;
|
|||||||
dcl-ds po likeds(USAdrValDS);
|
dcl-ds po likeds(USAdrValDS);
|
||||||
|
|
||||||
dcl-s ID varchar(20);
|
dcl-s ID varchar(20);
|
||||||
// Get USPS UserID.
|
dcl-s PWD varchar(20);
|
||||||
|
// Get USPS UserID & Password
|
||||||
in USPS_ID;
|
in USPS_ID;
|
||||||
ID = %trim(USPS_ID);
|
ID = %trim(USPS_ID);
|
||||||
|
in USPS_PWD;
|
||||||
|
PWD = %trim(USPS_PWD);
|
||||||
|
|
||||||
clear po;
|
clear po;
|
||||||
|
|
||||||
// Call USPS Address Validate API. It returns an XML document.
|
// Call USPS Address Validate API. It returns an XML document.
|
||||||
exec sql
|
exec sql
|
||||||
values QSYS2.HTTP_GET(
|
values QSYS2.HTTP_GET(
|
||||||
'http://production.shippingapis.com/ShippingAPI.dll'
|
'https://secure.shippingapis.com/ShippingAPI.dll'
|
||||||
concat '?API=Verify&XML=' concat
|
concat '?API=Verify&XML=' concat
|
||||||
url_encode(
|
url_encode(
|
||||||
'<AddressValidateRequest ' concat
|
'<AddressValidateRequest ' concat
|
||||||
'USERID="' concat :ID concat '">' concat
|
'USERID="' concat :ID concat '"'
|
||||||
|
concat ' PASSWORD="' concat :PWD concat '">' concat
|
||||||
'<Revision>1</Revision>' concat
|
'<Revision>1</Revision>' concat
|
||||||
'<Address ID="0">' concat
|
'<Address ID="0">' concat
|
||||||
'<Address1>' concat :pi.Address1 concat '</Address1>' concat
|
'<Address1>' concat :pi.Address1 concat '</Address1>' concat
|
||||||
@@ -77,7 +88,7 @@ dcl-proc USAdrVal export;
|
|||||||
'<Zip5>' concat :pi.Zip5 concat '</Zip5>' concat
|
'<Zip5>' concat :pi.Zip5 concat '</Zip5>' concat
|
||||||
'<Zip4>' concat :pi.Zip4 concat '</Zip4>' concat
|
'<Zip4>' concat :pi.Zip4 concat '</Zip4>' concat
|
||||||
'</Address>' concat
|
'</Address>' concat
|
||||||
'</AddressValidateRequest>'
|
'</AddressValidateRequest>'
|
||||||
)
|
)
|
||||||
) into :retXML;
|
) into :retXML;
|
||||||
if (SQLSTATE <> SQLSUCCESS);
|
if (SQLSTATE <> SQLSUCCESS);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
**free
|
**free
|
||||||
ctl-opt debug option(*nodebugio: *srcstmt)
|
ctl-opt debug option(*nodebugio: *srcstmt)
|
||||||
dftactgrp(*no) actgrp(*caller)
|
dftactgrp(*no) actgrp('USPS')
|
||||||
bnddir('UTIL_BND':'SQL_BND':'ADRVAL_BND')
|
bnddir('UTIL_BND':'SQL_BND':'ADRVAL_BND')
|
||||||
main(Main);
|
main(Main);
|
||||||
//====================================================================
|
//====================================================================
|
||||||
@@ -83,7 +83,7 @@ dcl-proc Main;
|
|||||||
return;
|
return;
|
||||||
end-proc Main;
|
end-proc Main;
|
||||||
|
|
||||||
//=== Routine to print input and outpur side by side =================
|
//=== Routine to print input and output side by side =================
|
||||||
dcl-proc DspAdr;
|
dcl-proc DspAdr;
|
||||||
dcl-pi DspAdr;
|
dcl-pi DspAdr;
|
||||||
pi likeds(USAdrValDS);
|
pi likeds(USAdrValDS);
|
||||||
|
|||||||
Reference in New Issue
Block a user