CPYSPLF with *FIRST option.

0 pts.
Tags:
AS/400
Hi all, I am try to use the CPYSPLF command to send spoolfiles to a file, but there are 2 spoolfiles with the same name. The command can not use the *last option because the 1st file has the data I need. So I need a CPYSPLF command that has the spool number option of *first, or a way to change the command so that I can add the option. Can someone help me do this? Thanks.
ASKED: November 18, 2005  6:38 PM
UPDATED: November 20, 2009  8:11 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

you can use API QUSLSPL to retrieve all the spools then choose the first.

there are many samples for API QUSLSPL on the net. I can provide one, but not at this time. If necessary, feed back.

====================================================

If you truly want “*FIRST”, then just use “1″.

Tom

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • AmoSohi
    using the command WRKSPLF, display the 2 spool files. Hit F11 twice and it should display a 'File Nbr'. Note the 'File Nbr' for the spool file you wish to copy to a file using CPYSPLF command. Enter 'CPYSPLF' on the command line, then press F4. Enter the file name for where you wish to copy the spool file to, then also enter, the Job Name, User & Number information. On the field 'Spooled File Number', enter the 'File Nbr' you noted earlier and that will copy the exact file you require. Regards, Amo Sohi
    0 pointsBadges:
    report
  • MilesButler
    What about using the DLTSPLF *LAST option once you have carried out the CPYSPLF *LAST - you can cycle round as many times as you like.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following