Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support OSPL0400 for SpooledFileOpenList #29

Merged
merged 6 commits into from Jun 8, 2023
Merged

Conversation

jwoehr
Copy link
Contributor

@jwoehr jwoehr commented Apr 10, 2023

Support added ... WIP not fully tested

Signed-off-by: jwoehr <jwoehr@softwoehr.com>
@jwoehr
Copy link
Contributor Author

jwoehr commented Apr 11, 2023

Tested this with Ublu and seems to work just fine.
To test with Ublu in the Ublu main branch:

  • edit ublu/src/main/java/ublu/command/CmdSpoolFOpenList.java
  • at line 537 uncomment the following and rebuild Ublu
//            case 400:
//                result = SpooledFileOpenList.FORMAT_0400;
//                break;

Here's some Ublu to test this:

# change mysys.com myprofile mypassword
as400 -to @mysys mysys.com myprofile mypassword

# Create a JTOpen SpooledFileOpenList object
splfol -to @l -as400 @mysys

# Create an Ublu list object to hold the users for whom we want spooled files listed.
list -to @users

# Add a user to the list of users to check for spooled files for.
# Change SOMEUSER to a valid user profile with spooled files.
# You can add more than one user to the list of users of course.
@users -addstr SOMEUSER

# Add the list of users as a filter to the SpooledFileOpenList object
@l -fusers @users

# Set the format of the SpooledFileOpenList object to FORMAT_0400
@l -format 400

# Get the list
@l -to @ol -get

# Include the Ublu Spooled File List Item extension.
# Assumes Ublu's extensions directory is added to the include dirs.
# I.e. Java invocation of Ublu includes `-Dublu.includepath=/opt/ublu/examples:/opt/ublu/extensions`
include ux.sfli.ublu

# For each SpooledFileListItem returned in @ol by the `-get` operation,
# fetch and (by default) `put` the text of the spooled file
FOR @item in @ol $[
    ux.sfli.itemToSpoolF ( @mysys @item )
    ~ -fetch
]$
# end

@ThePrez ThePrez self-requested a review April 25, 2023 02:41
@ThePrez ThePrez added the enhancement New feature or request label Apr 25, 2023
Signed-off-by: Jesse Gorzinski <17914061+ThePrez@users.noreply.github.com>
Signed-off-by: Jesse Gorzinski <17914061+ThePrez@users.noreply.github.com>
@ThePrez
Copy link
Member

ThePrez commented Apr 27, 2023

@jwoehr, thanks for the contribution!
I made a couple very small changes as you can see. Can you please do a quick smoke test with the CI's build of this PR? (you should be able to access it here but I am new to this so let me know if you cannot)

@jwoehr
Copy link
Contributor Author

jwoehr commented Apr 28, 2023

Thanks for making changes. Exhausting week and business meetings and driving tomorrow. I'll build this and try it out over the weekend.

@jwoehr
Copy link
Contributor Author

jwoehr commented Apr 28, 2023

@ThePrez did you make the changes in my branch? Because I'm pulling and getting nothing.

@jwoehr
Copy link
Contributor Author

jwoehr commented Apr 28, 2023

Never mind @ThePrez it's just been too long a week and I was looking in the wrong place.

@jwoehr
Copy link
Contributor Author

jwoehr commented Apr 28, 2023

@ThePrez the code works but I'm not sure the format 0400 works ... it does not seem to return the time in UTC. Not sure what the problem is.

I don't think this is caused by your change. The more I look at it, the less I'm sure that format 0400 works.

@ThePrez
Copy link
Member

ThePrez commented Jun 8, 2023

My testing checks out. Happy to merge. Thanks for the contribution!

@ThePrez ThePrez merged commit 5648764 into IBM:main Jun 8, 2023
2 checks passed
@jwoehr jwoehr deleted the ospl_0400 branch June 8, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants