Retrieve CHRID of a spoolfile.

25 pts.
Tags:
CCSID
CLLE
IBM iSeries
PRTF
We have a CL program running as a batch program that copies a spoolfile to another spoolfile along with the original spoolfile attributes. The duplicate spoolfile is then FTPed to a 3rd party software for processing. I have to apply the CHRID of the original spoolfile to the duplicate spoolfile using OVRPRTF. What is the best way to do this? The original spoolfile can have different CHRID values depending on what we are printing (Cyrillic, Hebrew, English etc).


Software/Hardware used:
IBM iSeries
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  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.
  • ToddN2000
    Can you post your code for the copy? I'm curious as to what format the 3rd party is looking for. Why not just create another spool file, something like SENDFTPSPL,  and make this your work file for sending the spool to your 3rd party? Another option, depending on the scope of your job, would be to add a second spool file to the program and write to both spool files at the same time. One in each CHRID format you need.
    136,970 pointsBadges:
    report
  • BozMan001
    The spoolfile is first generated by PGM1 that calls a CL to OVRPRTF with the right CCSID depending on what is going to populated in the printer file. E.g. for if we are going to print Russian characters it does the following:
    OVRPRTF FILE(PRT100PR) CHRID(11381 1154) OUTQ(&OUTPUTQ) OVRSCOPE(*JOB) 

    The Cl program runs a a separate batch job that picks up these spool files and creates a new spool file with the attributes and contents of PRT100PR. This new spool file is then FTPed to the 3rd party software (which runs on a Windows server) using SNDTCPSPLF. The Cl program looks something like this:

    CRTPF      FILE(QTEMP/TEMPFILE) RCDLEN(379) SIZE(*NOMAX) 
    OVRPRTF    FILE(QPDSPSFA) PAGESIZE(72 198) 
    /*Dumps spoolfile attributes to QPDSPSFA*/               
    WRKSPLFA   FILE(PRT100PR) JOB(&MyJobNum/&MyUser/&MyJob) +   
                 SPLNBR(&MySplNum) OUTPUT(*PRINT)    
    RTVJOBA    JOB(&BchJob) USER(&BchUser) NBR(&BchJobNum)      
    CPYSPLF    FILE(QPDSPSFA) TOFILE(QTEMP/TEMPFILE) +     
                 JOB(&BchJobNum/&BchUser/&BchJob) +          
                 SPLNBR(*LAST) MBROPT(*ADD) CTLCHAR(*FCFC) 
    DLTSPLF    FILE(QPDSPSFA) +                         
                 JOB(&BchJobNum/&BchUser/&BchJob)  +       
                 SPLNBR(*LAST) /* deleting spoolfile */ 
    CPYSPLF    FILE(PRT100PR) TOFILE(QTEMP/TEMPFILE) +       
                 JOB(&MyJobNum/&MyUser/&MyJob)  +             
                 SPLNBR(&MySplNum) MBROPT(*ADD) CTLCHAR(*FCFC)
    OVRPRTF    FILE(QSYSPRT) PAGESIZE(72 378) LPI(6) +     
                 CPI(10) OVRFLW(72) CTLCHAR(*FCFC) +       
                 SECURE(*YES) OVRSCOPE(*JOB) SHARE(*YES) + 
                 OPNSCOPE(*JOB)                            
    CPYF       FROMFILE(QTEMP/TEMPFILE) TOFILE(QSYSPRT)    
    DLTOVR     FILE(QSYSPRT) LVL(*JOB)     

    I was hoping I could retrieve the CHRID of PRT100PR and do a OVRPRTF with it to QSYSPRT in the above code.

    25 pointsBadges:
    report
  • ToddN2000
    @BozMan001: I poked around a bit on our system. None of our PRTF's have a CCSID value, they are all 0.  We do have programs that copy spool files to a PF, and some of those do have a CCSID value.  

    My other question is how are you FTPing a spool file from an OUTQ?  Are you FTPing to another iSeries on the same release? 
    In order for the recipient to to use it , are you backing it up and sending a SAVF and they are doing a restore?

    If they are on a different release then you need to use the parameter for the target release so it will be usable

    We usually just send them the PF that has the CCSID value. We copy the spool file to this flat file in the correct CCSID. This way they can import it into there application.
    136,970 pointsBadges:
    report
  • BozMan001
    We send it to the virtual printer queue of the 3rd party software (called Transform) the SNDTCPSPLF command. The printer file needs to have the right CHRID for the 3rd party software print the correct characters. 

    When I check our machine, the CHRID value on our spool files is either *DEVD or 1381 1154 (Russian - from my test).

    25 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.

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

Following

Share this item with your network: