ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

PDF Conversion: Wrong Format?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF Conversion: Wrong Format?

    Okay so using the CVT2PDF programs slightly modified to not be a command but a called CL program I run into the problem of not being able to read the file directly from IFS directory that I place it in. First I have to either copy and paste it using websphere or FTP and then it opens fine; I can only guess that the issue is related to me selecting teh wrong code page or something??

    Any insights or help would appreciated.

  • #2
    Re: PDF Conversion: Wrong Format?

    please take a look at this it is changing the ccsid of a stream file using qshell



    look at the ccsid before you re-ftp it by using the wkrlnk command from the greenscreen
    then look @ the ccsid after u ftp it

    then use QSHELL to change it to the second ccsid rather than ftp....

    jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: PDF Conversion: Wrong Format?

      here are the parameters I pass:
      SPLFNAME = 'RODYAUDTRE'
      STMFNAME = 'DOWNLOAD AUDIT.PDF'
      DIR = '/REPORT'
      JOB = A VALID JOB NAME
      SPLIDCHAR = A VALID SPOOL NUMBER
      STMFOPTS = '*REPLACE'
      TITLE = 'DOWNLOAD AUDIT'
      BOOKMARK = ' '
      BKMRKPOS = ' '
      BKMRKKEY = ' '

      In the CL program I changed it to only PDF so have this line for the CPYSPLF
      CHGVAR VAR(&CTLCHAR) VALUE('*PRTCTL')

      and this one just before CPYTOSTMF
      CHGVAR VAR(&CODEPAGE) VALUE('*PCASCII')

      Did I miss any other settinsg for PDF conversion somehow?

      Comment


      • #4
        Re: PDF Conversion: Wrong Format?

        Is there an easy way to do this within teh CVT2PDF CL program?

        Comment


        • #5
          Re: PDF Conversion: Wrong Format?

          sure just put this in there with the correct values

          Code:
          STRQSH CMD('setccsid 819 /path/to/myfile.txt')
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: PDF Conversion: Wrong Format?

            Is there not a table of Code Pages where I can simply get the Code Page value I should be using instead of *PCASCII based on the CCSID? For instance the access denid documents are CCSID 1252 and I need them to 437.

            Comment


            • #7
              Re: PDF Conversion: Wrong Format?

              I dont know of any: did u do as I ask and get the ccsid's using the wrklnk command first.....? this will give us the actuall ccsid's then we use those (the second one) in your strqsh command. This should solve ur problem.
              Attached Files
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: PDF Conversion: Wrong Format?

                I am not familiar with the wrklnk command, how do you use it?

                Comment


                • #9
                  Re: PDF Conversion: Wrong Format?

                  Though like I mentioned when its first created it has CCSID of 1252, then when I drag over to the C drive using websphere and then drag it back it has a CCSID of 437 which is readable and does not give the access denied error.

                  Could I not just change the CODEPAGE variable to be 00437 instead of *PCASCII, or is that something different?

                  Comment


                  • #10
                    Re: PDF Conversion: Wrong Format?

                    Hmmm okay it shows the proper code page now but I still get teh access denied issue, unless I copy it over to my hard drive using websphere and then put it back. So I wonder if the change I made is just cosmetic for the appearance but it is not actually doing the conversion.

                    Comment


                    • #11
                      Re: PDF Conversion: Wrong Format?

                      Sorry ur kinda on uncharted water here.......
                      I would remove the *PCASCII and replace with 00437 and see what happens.
                      delete the document(*PDF) from the IFS cause the system takes attributes from it if it already exists........

                      so delete first then run your process.


                      jamie
                      All my answers were extracted from the "Big Dummy's Guide to the As400"
                      and I take no responsibility for any of them.

                      www.code400.com

                      Comment


                      • #12
                        Re: PDF Conversion: Wrong Format?

                        Just tried and it said it is in 437 CCSID but when I try to open I am getting same error, I am guessing I need to actually convert the data somehow, I think it is in EBCDIC still or something.

                        Comment


                        • #13
                          Re: PDF Conversion: Wrong Format?

                          This really starting to bug me that I have it almost working the way its supposed to, I have included a copy of the CL program code that I use maybe somebody else can spot the glitch. My problem is that it generates the PDF in the IFS folder I specify but I can open it in adobe until I have ftp'd or copied it in websphere to the C drive.

                          Any help would be great.
                          Attached Files

                          Comment


                          • #14
                            Re: PDF Conversion: Wrong Format?

                            remmeber to delete the version on the IFS before you rerun

                            you left this line as *pcascii

                            Code:
                            000242060201             /* SET THE CODEPAGE OF STREAM FILE TO BE CREATED */
                            000243060203                CHGVAR     VAR(&CODEPAGE) VALUE('*PCASCII')
                            try
                            Code:
                            000242060201             /* SET THE CODEPAGE OF STREAM FILE TO BE CREATED */
                            000243060203                CHGVAR     VAR(&CODEPAGE) VALUE('437')
                            All my answers were extracted from the "Big Dummy's Guide to the As400"
                            and I take no responsibility for any of them.

                            www.code400.com

                            Comment


                            • #15
                              Re: PDF Conversion: Wrong Format?

                              Tried the change and still remain unsuccessful, is there a CL command to convert data from CCSID to another, I mean is it possible it is listing it as one CCSID type but it is really still another??

                              Or any other suggesstions??

                              Comment

                              Working...
                              X