Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: RE: SORT JSON type of data

$
0
0
Author: maxsubrat
Subject: Reply to: SORT JSON type of data
Posted: Thu Apr 20, 2017 9:09 am (GMT 5.5)

Hi Arun,

The data starting position may not be same, it may vary, But one thing is sure, the 2nd quotes( "") carries the data, also it is just after the colon (:).

The no. of input records may be many.But the records comes as a JSON format. Here I can give one example of input file which has JSON format data and it has 3 records below.

Code:
{
    "requests": [
        {
            "confirmationNumber": "12345678",
            "userId": "22DD50D4-91C1-4B43-9F67-DB14976D72D9",
            "segmentId": "60142429549",
            "lastName": "User1LastName",
            "firstName": "User1FirstName",
            "segmentStartDate": "2017-04-14T15:05:00-0800",
            "segmentEndDate": "2017-04-15T15:05:00-0800",
            "requestDate": "2017-02-14T15:05:00-0800"
        }, {
            "confirmationNumber": "87654321",
            "userId": "DE78B6BB-18A8-4321-BE13-90D04A617A0F",
            "segmentId": "60142429550",
            "lastName": "User2LastName",
            "firstName": "User2FirstName",
            "segmentStartDate": "2017-03-14T15:05:00-0800",
            "segmentEndDate": "2017-03-16T15:05:00-0800",
            "requestDate": "2017-02-14T15:05:00-0800"
        }, {
            "confirmationNumber": "12348765",
            "userId": "85A0891D-B53B-4257-AE02-087409292F18",
            "segmentId": "6014242951",
            "lastName": "User3LastName",
            "firstName": "User2LastName",
            "segmentStartDate": "2016-05-14T15:05:00-0800",
            "segmentEndDate": "2016-05-15T15:05:00-0800",
            "requestDate": "2016-02-14T15:05:00-0800"
        }
    ]
}


Thanks

Code'd


Viewing all articles
Browse latest Browse all 8500

Trending Articles