I am trying to read spool files from iseries in C# with the cwbx library, to that avail i have read the api and called the QUSCRTUS API in order to create an user space and then QUSLSPL to fill the user space with my user's spool data.
So far so good, i can see the user space being filled with the info i need:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Ø0100SPLF0100QUSLSPL 1151007110852C h { Y ¢ ø Ç ì FLEON QGPL SPLF0100*CURRENT *ALL *ALL *ALL xxxxxxxxFLEON *ALL FLEON QGPL *ALL *ALL FLEON PRTCAJOD20QGPL *STD FLEON i ?» pà'e ®ø G W µià'wÇô} FLEON PRTCONT01 QUSRSYS *STD SIPD93 i "ë q @ lÚ èM´ ié@ÑÆ/- FLEON PRTINF01 QUSRSYS *STD HJPD05 i ø qÀ¦ü¶³} D Õ àiÀ¥] É\ FLEON PRTVILLA05QUSRSYS CHEQUES FLEON i r pø_ ½ ø Õ' ãiø_ j \ FLEON RGI462 QUSRSYS *STD CLPD741 i h ºmi)oNø åÕ ÏimýS Aµ FLEON PRTCON0206QUSRSYS *STD HJPD27 i +¿ rk:ôá{{ ik:T ° FLEON PRTPACO QUSRSYS *STD SIPD93 i "ë q @ lÚ Ñã· i<º3 ê\ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
My problem is that i don't know how to call the QUSRTVUS API in order to read the user space. I don't want to call any service program or code something in the iseries, i want everything to be done in my C# application. When i call the api i only see some x's instead of the list entries i need to then call the final API to read the contents.
I am using the SPLF0100 format. My problem could be that the API is expecting binary variables instead of char or integers, so i may not know how to properly convert the data in the parameters. I tried to use a structure as shown above but i don't know if the length of each field can be declared literally from the api, which shows each field type and size.
I can read from the receptor variable all variables that can be mapped to chars, such as "datecreated". I am just having trouble with the variables that are supposed to be binary, such as "numberlist"
Member_2_276102
'Starting position' and 'Length of data' are both 4-byte (32-bit) binary integers.
Of more concern, though, might be that the content of the user space is going to be EBCDIC and including various printer controls, along with various binary integer values for lengths, offsets, etc. That means that you need to ensure that no EBCDIC/ASCII conversion happens when a buffer comes across the connection and that you process buffer data bytes accordingly.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.