I am getting a problem while trying to TXT to PDF conversion. When i do it using BATCH job.. I get the desired result. Here REPORT is input and PDFRPT is output and then i am encoding it using BASE64 and then mailing the PDF file.
Batch Code:
Code:
//* Send e-mail in pdf format
//*
//TSOBATCH EXEC PGM=IKJEFT01,
// PARM='TXT2PDF CONFIG DD:CONFIG'
//SYSEXEC DD DSN=BQ.W.ENDEVOR.BQCTI-S2.SRCLIB.REXX,
// DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//*REPORT DD DUMMY
//REPORT DD DSN=BQ.W.TEST.CONN4X.ADCAJFBC.OUTPUT8,
// DISP=SHR
//PDFRPT DD DSN=&&PDFRPT,
// DISP=(NEW,PASS,DELETE),UNIT=SSORT,
// SPACE=(CYL,(10,10),RLSE),
// DCB=(RECFM=VB,LRECL=4100,BLKSIZE=0)
//*
//CONFIG DD *
IN dd:report OUT dd:pdfrpt
IFEMPTY blank
ORIENT port
LM .2 TM .2 RM .2 BM .2
PAPER 8.5x11/GrayBar
FONT 7/Courier/105
MAG FitWidth
*OLTOK "RECORD DESCRIPTION FOR RECORD"
*OUTLINE "SC/2/24/15/RECORD DESCRIPTION FOR RECORD"
CC NO
OUTLINE "SC/2/24/15/RECORD DESCRIPTION FOR RECORD"
*PAGE Outline/SinglePage
*
*OUTLINE "SC/2/24/15/RECORD DESCRIPTION FOR RECORD"
*OLTOK "/"
PAGE Outline/OneColumn
CONFIRM V
COMPRESS 9
*
/*
//*
When i converted the same code in the REXX and ran the code.. there is some error. I am getting my PDF file but with no DATA.
TERMINAL NOT ALLOCATED, FILE IN USE
FILE SYSOUT NOT FREED, IS NOT ALLOCATED
FILE SYSIN NOT FREED, IS NOT ALLOCATED
422 *-* "call *(IKJEFT01)"
+++ RC(-71) +++
NUMBER OF RECORDS PROCESSED WAS 18
NUMBER OF RECORDS PROCESSED WAS 18
NUMBER OF RECORDS PROCESSED WAS 6
Can you help me where i have done the mistake .. and why this kind of error is coming..
pleaes let me know if you need any more info...
Thanks.
Unfortunately I am not able to access TXT2PDF exec due to access problem. In batch job. PARM parameters takes 'TXT2PDF CONFIG DD:CONFIG' to identify input parameters.. and i have passed these parameters with SYSIN card..
My problem is just that if there is any coding error in REXX due to which PDF file is not generating OR
I have used SYSIN card. this may be not correct so Is there any other way to pass PARM fields in IKJEFT01 prog.. ?
PEDRO: I tried with Enrico's advice also but that also didn't work. You are right, i am having read access over TXT2PDF exec. Last time i mistakenly looked into someother exec that's why confusion created. Now i checked TXT2PDF exec.. it takes input as a string and then parsing that string.. Its not pulling records one by one.
I tried with SYSTSIN also...and reached one conclusion which i want to share with you to confirm if i am right..
Actually I am running my REXX macro thru IKJEFT01 prog in batch and passing some inputs thru SYSTSIN card. and now in that REXX macro itself, i ran TXT2PDF exec to convert output in PDF format. and i am trying to run TXT2PDF exec specifying in SYSTSIN card again using IKJEFT01 program. So my assumption is that my parent REXX macro is already using SYSTSIN card and again i am assigning values in SYSTSIN card to run IKJEFT01 (for TXT2PDF exec) while SYSTSIN card has not been freed that's why its not taking input and not converting input dataset in PDF format.
Here i am passing some parameters thru SYSTSIN card in rexx macro.. and SYSTSIN card is defined as OLD. so probably it creates some kind of lock. I don't know more but it may be..
I am getting error in SYSTPRT card like this..
Code:
FILE SYSTSIN NOT FREED, DATA SET IS OPEN
DATA SET BQ.W.TEST.CONN4X.ADCAJFBC.SYSTSIN NOT ALLOCATED, FILE IN USE
428 *-* "call *(IKJEFT01)"
+++ RC(-71) +++
FILE SYSTSIN NOT FREED, DATA SET IS OPEN
I have tried multiple option and not getting any solution... bt still thinking that there must be solution for this.. I don't want to lose my hope before i go for last solution of running TXT2PDF in batch only.
I can run it in BATCH mode also but you know it won't look good. Actually i need to send 3 confirmation mails. first to indicate user that your job has been started then 2nd mail with output created and 3rd for confirmation of completion of the job. Now i am sending 1st mail thru REXX macro and if i do the PDF conversion in BATCH instead of REXX, then i will have to send 2nd and 3rd mail also thru batch only.
I hope, i have not confused you guys.. Thanks for your replies.
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
Quote:
I tried with Enrico's advice also but that also didn't work.
Actually, that is the preferred method. Please show us what you tried and what error messages you get.
In your non-preferred example, You did not show us the contents of SYSTSIN. It is the most important part. But you already looked at the exec and concluded that it does not read records from SYSIN nor from SYSTSIN... why are you continuing to try something that you know will not work.
you are right. I have left the idea of using SYSTSIN which is not working.
I found another solution to get my objective achieved.
Currently I was able to convert txt to PDF in batch job.. so i have just coded all those JOB lines in a dataset. and then submitted that job using TSO SUBMIT..
I know this is not preferrable method too and i don't know whether it will be approved by my seniors. bt for now I am able to get my report in PDF format.
I will let you know the error which i got with Enrico's solution on Monday as now i am at my room without mainframe connectivity.
You are already running IKJEFT01. You can not start IKJEFT01 inside of IKJEFT01. If you need to run TSO commands, just run them. You are already in TSO.