Return to site

How Do You Order The Queue In Djay

broken image


Data Queues are a common object type in many applications on IBM i Systems: They offer an easy way to queue up data to be read and processed. Easy to load, easy to read and an easy way to handle sequential data. The only thing that I really dont like about them is the tricky way you have to poke around in them to look at their contents. But, I found this neat article on that highlights some new IBM i *API's that change to the old way that data quees are handled… we can now retrieve data queue entries without removing them. Yay!

Queue definition is - a braid of hair usually worn hanging at the back of the head. How to use queue in a sentence. Is it que, queue, or q?

This allows us to peek at Data Queue contents without upsetting programs that are processing the queue itself…

(a) Find out how many messages are on a *DTAQ

How to download current version garageband. (b) How long the oldest message had been on the queue

(c) Find the size supported for a given *DTAQW

We'll look at how to answer all of these questions, and more, using the Retrieve Data Queue Description (QMHQRDQD) and Retrieve Data Queue Message (QMHRDQM) APIs.

The Retrieve Data Queue Description API retrieves the description and attributes of a data queue. This information includes:

  • Number of entries currently on the queue (one of the asked questions)
  • Maximum number of messages that was specified using the SIZE parameter of the Create Data Queue (CRTDTAQ) command (again one of the asked questions)
  • If the data queue is accessed first-in first-out (FIFO), last-in first-out (LIFO), or by key values (though not asked, we'll see that this is a key piece of information in order to determine the age of the oldest message)
  • Maximum message and key length supported
  • If sender information is included with messages
  • Quite a bit more

The Retrieve Data Queue Message API retrieves one or more messages from a data queue. Using the API:

  • Messages retrieved are not removed from the *DTAQ, so there is no disruption to other jobs processing/reading from the queue
  • You can specify if you want the first or last message on the *DTAQ when working with a non-keyed queue
  • Returned message information includes the date and time the message was enqueued (which again is needed to determine the age of a given message)

Using these APIs, the following GetDQInfo program provides the answers to the earlier asked questions:

https://glutimacneu1972.mystrikingly.com/blog/add-a-blog-post-title-dde109f8-effe-4ae9-ad15-088d267d9bba. Topic: Occasional stutter when loading songs Virtual Dj 8 Mac FredFredrickson Home user Member since 2015 I'm using iMac 2010 intel core i3 3 ghz with the behringer studio 4a. I've never had a problem with the behringer on a pc, but using it on the mac I ran into a few stutters last night while playing live. Error loading song If you get ' Error ' when trying to load a song onto a deck, then it most cases this means that the entry for the song in your VirtualDJ database is no-longer valid. This is usually caused by either moving, renaming or deleting the song outside of VirtualDJ, so the entry in its database no-longer points to a valid file. Loading on old computers or on 'NetBook' computers will be slow due to the low performance of these systems. You are using a slow hard drive, or slow USB connection (Some older computers may only have USB 1.x ports instead of 2.0) If you are loading videos, these are very large files (Typically 10x the size of a normal MP3 audio file), so they will naturally take much longer to load. Imacalu PRO Infinity Member since 2008 Hi Guy's, i've used VDJ 5.2.1 for the first time with my DN-HC4500 on my imac last weekend. What a relief instead of having to use the mouse with traktorDJ all the time.:-) But i got errors with three diffirent songs while loading them. I wasn't able to use them. One Mp3 song and two M4a (aac) which i ripped from my own original cd's already years ago. Person1229 PRO Infinity Member since 2009 Almost every song I have says ERROR when loading to a deck. It's pretty much every filetype, I've only gotten a few songs to work. I've tried changing the codec (m4a to use quicktime) but I've had no success. I've put in a support ticket, but the faster this is fixed the better. I can't find any kind of.

The Get Data Queue Information (GetDQInfo) program defines two input parameters. These are, respectively, the name of the *DTAQ to be accessed and the name of the library containing the *DTAQ. As the Retrieve Data Queue Description API supports the special values *CURLIB and *LIBL for the library, GetDQInfo will also support them as a freebie.

After setting the API ErrCde structure to not return exceptions in the *inzsr subroutine, GetDQInfo calls the Retrieve Data Queue Description API to access attribute information related to the *DTAQ identified by the two parameters passed to GetDQInfo. As with most retrieve type APIs, the QMHQRDQD API has as its first four parameters a receiver variable to return the attribute information in, the size of the receiver variable, the format of the attribute information to be returned in the receiver variable, and the name of the object to be used. QMHQRDQD is, however, different from most other system APIs in that it does not provide for an error code structure. This is in part due to the age of the API; it was first introduced in V2R1 while the error code structure was not formalized until V2R2, and for some reason the error code structure was never added as an optional parameter when the API was enhanced in later releases in support of 2GB sizes, relational database name for RDB DDM *DTAQs, etc. In any case, this lack of an error code structure is why GetDQInfo uses a monitor when calling the API. If an exception is encountered, such as the data queue not being found, then GetDQInfo dsplys a message pointing the caller to the job log and ends. GetDQInfo could of course use message-handling APIs as discussed in a much earlier API Corner article, More on Message Handling, to access the actual message(s) and provide more information than just a pointer to the job log, but today we're talking about data queue APIs.

If the attribute information was successfully retrieved, then a check is made to see if this is a DDM *DTAQ. If so a message is dsplyed that DDM queues are not supported and the program ends. As provided, the GetDQInfo program needs to run on the system (or against the library) where the actual data queue resides.

GetDQInfo then dsplys a message providing the qualified *DTAQ name of the data queue being analyzed. When constructing this dsply text, the variables GetDQInfo uses are the returned field names of QMHDQLib and QMHDQN rather than the parameter values passed to GetDQInfo. This allows the dsply to have the library name the API resolved to, handling situations where special values such as *CURLIB or *LIBL have been used.

GetDQInfo then dsplys two messages, the first showing the maximum size of the data queue and the second the number of messages currently residing on the queue. If one or more messages do currently exist on the data queue (QMHNbrM > 0) GetDQInfo then prepares to call the Retrieve Data Queue Message API, QMHRDQM.

As with QMHQRDQD, the first four parameters defined for QMHRDQM are the receiver variable to return the message information in, the size of the receiver variable, the format of the message information to be returned in the receiver variable, and the qualified name of the *DTAQ. Following these four initial parameters are four additional parameters. The first three additional parameters have to do with selecting which messages(s) are to be returned, and they are message selection information, the length of the message selection information, and the format of the message selection. Following these parameters is the standard system API error code parameter.

There are two message selection formats defined: RDQS0100 for non-keyed data queues and RDQS0200 for keyed data queues. Using the previously returned QMHQRDQD key-length value, QMHKL, GetDQInfo then prepares the appropriate message selection format requesting that the 'oldest' message be retrieved.

When the *DTAQ is non-keyed (QMHKL = 0), GetDQInfo needs to determine if the data queue is FIFO or LIFO. This is done by testing the Sequence attribute (QMHuence) returned by QMHQRDQD. If the sequence is FIFO (QMHuence = ‘F') then the selection type of RDQS0100 (QMHType) is set to select the first (‘F') message on the queue. Otherwise, the queue must be LIFO (QMHuence = ‘L') and the selection type is set to the last (‘L') message on the queue. As a general heads up, I will point out that a DDM *DTAQ will also return a QMHKL value of 0 and that other QMHuence values do exist (a blank for DDM queues, a ‘K' for keyed queues). In the case of GetDQInfo, this is not a concern due to earlier checks for DDM (QMHType01 = ‘1') and keyed queues (QMHKL = 0). Having set QMHType, GetDQInfo then sets the number of message text bytes to retrieve (QMHNTBR) to 0 as we really don't care about the value of the message; all we want is the day and time the message was written to the data queue. The QMHRDQM API is then called using the previously set selection criteria.

How Do You Order The Queue In Djay

When the *DTAQ is keyed, we really need to have some awareness in the program of how the keys are used and constructed. GetDQInfo, for demonstration purposes, simply assumes that the lowest key value represents the oldest message. With that assumption in mind, GetDQInfo sets the selection type (DQKeyVal.Hdr.QMHType00) to ‘K' for keyed selection, the key search order (DQKeyVal.Hdr.QMHSO) to greater than or equal to (‘GE'), the number of text bytes to retrieve (DQKeyVal.Hdr.QMHNbrTR) to 0, the number of key bytes to retrieve (DQKeyVal.Hdr.QMHNbrKR) to 0, the length of the key (DQKeyVal.Hdr.QMHKL00) to the value of QMHKL (key length) previously returned by QMHQRDQD, and the key to be used (DQKeyVal.KeyVal) to hex 0s. The QMHRDQM API is then called using the previously set selection criteria.

If no error is encountered when calling QMHRDQM (ErrCde.Hdr.QUSBAvl = 0), a check is made to determine if a message was returned (DQMsgHdr.Hdr.QMHNbrMR > 0). This check is to cover the case where there was at least one message on the *DTAQ when QMHQRDQD was called but the messages have been received/removed by other jobs on the system before we were able to call QMHRDQM to access the message.

If no message was returned by QMHRDQM, then an appropriate message is dsplyed and the program ends.

If a message was returned, GetDQInfo accesses the information using the provided offset to first entry (QDMsgHdr.Hdr.QMHOFE). The date and time that the message was written (DQMsg.QMHMDT00) is returned by the API using an internal system format referred to as *DTS. GetDQInfo converts this *DTS value to a YYYYMMDDHHMMSS format using the Convert Date and Time Format (QWCCVTDT) API. For space reasons, I will not go into this API today, but you may see it again in a future API Corner (in fact I was rather surprised to find that I hadn't previously written about QWCCVTDT). A calculation of the number of seconds that have elapsed since the time the message was written and the current time is then made, the result is dsplyed, and the program ends.

How Do You Order The Queue In Djay Youtube

We now have a general-purpose program that can determine the answers to specific data queue-related questions: what's the backlog on the queue, what's the age of the oldest message, and what is the maximum size of the queue? By looking at the API documentation, you'll find that you can also get the answers to quite a few other unasked questions, perhaps some that you've always wondered about.

Source – http://www.mcpressonline.com/apis/the-api-corner-what-s-the-status-of-my-data-queue.html

Our journey so far

Since the beginning, Algoriddim's mission has been to make DJing accessible to everyone, anywhere, at any time. When we launched the first version of djay back in 2006, it was completely free as we wanted to remove any barriers whatsoever for casual music listeners to embrace the art of DJing. This had a profound impact on DJing for years to come.

As our user base grew and as users grew with our app, they started to need more advanced features. We listened to our users' feedback and took djay to retail in 2007 as a $50 purchase available through our online store and as a CD/boxed software in physical stores (djay was originally printed on CDs and sent across the globe.. we've come a long way!). A considerable number of users of the free version updated right when we announced the $50 upgrade. We were blown away by the loyal support of these early adopters.

Those users helped bootstrap Algoriddim and it has allowed us to continuously improve and expand our app. We have stayed independent ever since, thanks to the millions of djay users around the world, who have contributed to the global phenomenon that djay is today.

How Do You Order The Queue In Djay Free

Why have we made djay free with an optional subscription?

With smartphones and tablets being so ubiquitous now, we want to once again open up DJing to even more people than ever before. We decided to make djay a free download again. Moreover, in the same way that djay made mixing music accessible to the masses, we wanted to do the same for creating music… music production relies on access to an extensive library of content.

For a high quality and seamless experience we have licensed content from world-class artists and labels. Moving to in-app subscription gives us an easy way to add more packs, more sounds, more videos, in a way that ensures everyone has access to the same downloads, without further cost barrier. Customers pay monthly to access every official download as they're added.

No more paid upgrades

In the past, we would release one major update every two to three years, as a paid upgrade or new app. Since the App Store (the main distribution channel to purchase our apps) didn't provide a way to distinguish between new and existing customers there was no way we could reward existing users for their loyalty any more.

While we published constant smaller updates throughout the year, this long release cycle meant we would also have to hold back major features for the next major release, resulting in a sometimes long wait to include them. With the new subscription model, our team can now focus on making the existing version the best product with every innovation going directly into the product as soon as it's ready.

Over the years we have built eight different versions of djay and vjay on the iOS App Store alone, and we couldn't even offer cross-grade between the apps: customers had to buy the apps on both iPhone and iPad individually, and pay for add-ons such as effects separately. With this new release of djay, we wanted to simplify the process and unify the brand. With the free download, users that choose to subscribe only pay as long as they need to use the app, and don't have to worry about different features or versions of the app across all of their iOS devices.

How Do You Order The Queue In Djay 1

Subscription provides ongoing value

The change to subscriptions allows us to offer a free trial before customers choose to spend money. In the past, the iOS apps were full price before even being able to try. And unlike the traditional model on desktop where you offer demo versions with stripped down functionality (thanks to the old shareware mindset of the 1990s), the free trial implemented as part of the subscription model on the App Store allows you to use the full experience for a full week. It's the ultimate try before you buy experience!





broken image