Got my vote

Gad


date: Tue, 1 Feb 2022 14:17:01 +0000
from: Rob Berendt <rob@xxxxxxxxx>
subject: IBM delivers enhancements to the IBM Entitled Systems Support
website

IBM delivers enhancements to the IBM Entitled Systems Support website

https://www.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/9/897/ENUS122-039/index.html

I hope this means the automation of renewal of Update Access Keys will
actually work. Silly they added this capability to the HMC but you still
had to go to ESS and bless the darn things first.

https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=153152


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 7310 Innovation Blvd, Suite 104
Ft. Wayne, IN 46818
Ship to: 7310 Innovation Blvd, Dock 9C
Ft. Wayne, IN 46818
http://www.dekko.com



------------------------------

message: 4
date: Tue, 1 Feb 2022 09:35:13 -0500
from: Jay Vaughn <jeffersonvaughn@xxxxxxxxx>
subject: Re: Making existing JSON "pretty" before EDTF or DSPF

as promised...

https://github.com/jeffersonvaughn/ibmi-json-beautify

Call jsonpretty passing in a streamfile path/filename, which contains a
json string
The file is updated to a pretty json format...

example...

before:

{"env":"xxx","command":"getListOfAPIs","payload":[{"apiLibrary":"COREIRST"},{"apiLibrary":"COREIADM"}]}


after:
{
"command": "getListOfAPIs",
"env": "xxx",
"payload": [
{
"apiLibrary": "COREIRST"
},
{
"apiLibrary": "COREIADM"
}
]
}

Jay

On Tue, Feb 1, 2022 at 8:37 AM Jack Prucha <Jack.Prucha@xxxxxxx> wrote:

Thanks specifically to Scott some years ago and Jon for many other JSON
answers I wrote a pgm to display prettified JSON in a subfile. The JSON
is
read from a CLOB in a DB2 file. The commented out yaj_savBuff might be
useful for your uses, I don't know.

These are the important bits:

Dcl-s BeginPos Int(5:0);
Dcl-s DelimPos Int(5:0);

// YAJL variables
Dcl-s Root Like(yajl_val);
Dcl-s errMsg VarChar(500) Inz(' ');
Dcl-s ptrJSONContent Pointer;
Dcl-s rtnLen Int(10);
Dcl-s lenJSONContent Int(10);
Dcl-s rc Int(10);
Dcl-s prettyJSON Char(65535);

//
=======================================================================
Begsr FmtPrettyJSON;
//
-----------------------------------------------------------------------

rc = yajl_genOpen(*On);

ptrJSONContent = %Addr(wrkContent_Data);
lenJSONContent = wrkContent_Len;
Root = yajl_buf_load_tree(ptrJSONContent:lenJSONContent:errMsg);

rc = yajl_genFromNode(*Omit:Root);

yajl_tree_free(Root);

//rc = yajl_saveBuf('/tmp/prettyJSON.json':errMsg);
rc = yajl_copyBuf(0:%Addr(prettyJSON):65535:rtnLen);

yajl_genClose();

EndSr;

//
=======================================================================
Begsr SflLoadAll;
//
-----------------------------------------------------------------------

Clear RR0101;
BeginPos = 1;

Dow 1 = 1;

DelimPos = %Scan(x'25':prettyJSON:BeginPos);

// Not found - end of JSON
If DelimPos = 0;
// Find end of last "record" in JSON - no delimiter
// Done - Get out of loop
Leave;
EndIf;

SflLoadOne(prettyJSON:BeginPos:DelimPos);

// Setup next scan
BeginPos = DelimPos + 1;

EndDo;

// Display records & "End"
If RR0101 > *Zero;
SflDsp = *On;
SflEnd = *On;
// Point back to 1st page
RR0101 = 1;

// No records
Else;
// Display "No Records"
EndIf;

EndSr;

//
=====================================================================
Dcl-Proc SflLoadOne;
//
---------------------------------------------------------------------
// Extract single JSON element & add to subfile
//
---------------------------------------------------------------------
Dcl-pi *N;
JSONText Like(prettyJSON);
BegPOS Like(BeginPos);
EndPOS Like(DelimPos);
End-Pi;

Dcl-s wrkBegPos Like(BeginPos);
Dcl-s wrkEndPos Like(DelimPos);
Dcl-s wrkStrLen Like(DelimPos);
Dcl-s ExtJSONText Like(s1JSON);

//
---------------------------------------------------------------------

wrkBegPos = BegPos;
wrkEndPos = EndPos;
wrkStrLen = wrkEndPos - wrkBegPos;

RR0101 = RR0101 + 1;
Clear s1JSON;
s1JSON = %Subst(JSONText:wrkBegPos:wrkStrLen) ;
Write PN01SF01;

Return;

END-Proc;

This email, including any documents, files, or previous email messages
attached to it, has been sent from an email account of College Foundation
Inc., (CFI) and may contain confidential, proprietary, or legally
privileged information belonging to CFI. If you are not the intended
recipient, any dissemination, distribution, or copying of this email or
its
attachments is strictly prohibited. If you have received this email in
error, please immediately notify the sender by email and destroy the
original email and any attachments.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com



------------------------------

Subject: Digest Footer

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


------------------------------

End of MIDRANGE-L Digest, Vol 21, Issue 155
*******************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.