Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to increase the LRECL of SQL output in a Job.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
natinuk

New User


Joined: 23 Nov 2006
Posts: 22
Location: India

PostPosted: Fri Feb 22, 2008 2:49 am    Post subject: How to increase the LRECL of SQL output in a Job.
Reply with quote

Hi,

I am using the below JCL, when i saw REPORT.OUTPUT, the result set gets skipped to next line after LRECL of 133. Can you please help me in getting all the result set in a single line.

//S1 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=DB2.MODLIB,DISP=SHR
// DD DSN=DB2.DSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//*SYSPRINT DD SYSOUT=*,
//SYSPRINT DD DSN=REPORT.OUTPUT,
// DISP=(,CATLG,DELETE),
// UNIT=DISK,SPACE=(CYL,(5,1),RLSE),
// DCB=(RECFM=FB,LRECL=300)
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(STS)
RUN PROGRAM (DB2I) PLAN(DB2I) -
LIB('DB2.SOFTWARE.LOAD')
END
/*
SELECT *
FROM STS.STU_MACK
WHERE ACCOUNT = '0100000'
;
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Feb 22, 2008 3:26 am    Post subject:
Reply with quote

Hi,

You subject line & then the description inside the body of thread are different.

If You use LRECL=whatever in DCB parameter for the output file then I think You should be done with what is asked in subject line. I tried it & it's working for me unless I misunderstood the query.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Feb 22, 2008 3:27 am    Post subject:
Reply with quote

No.

The only way is to modify the DB2I program which is presumably a copy of DSNTEPn ( PL/I ) and redirect the output into an appropriate file ..... with length OK for this time, but maybe insufficient for another select.

SYSPRINT has a pagewidth ( recsize ) of 133.
Back to top
View user's profile Send private message
natinuk

New User


Joined: 23 Nov 2006
Posts: 22
Location: India

PostPosted: Fri Feb 22, 2008 3:37 am    Post subject: How to increase the LRECL of SQL output in a Job
Reply with quote

I have mentioned the LRECL of 200 for the file, but as you said the default
SYSPRINT has a pagewidth of 133, So after this the results were displayed in the next line....
+-------------------------------------------------------------
| ACCOUNT| N_AC_DDL | N_DEPT_DV | N_CK | I_LA |
+-------------------------------------------------------------
1_| 0100000 | ? | 0001222 | 0001 | NA0100000 |
+-------------------------------------------------------------
1PAGE 2
---------------------------------------------------------------
| NR_ACCOUNT | SIV | CLASS | CLOSE_RESN | STATUS |
---------------------------------------------------------------
1_| 0100000 | SH | NAT | NA | OP |
---------------------------------------------------------------
0SUCCESSFUL RETRIEVAL OF 1 ROW(S)

Here, after displaying the results for some columns, the next set of columns were displayed in the next line. Can we bring this to in single line?
Please advice.



PeD wrote:
No.

The only way is to modify the DB2I program which is presumably a copy of DSNTEPn ( PL/I ) and redirect the output into an appropriate file ..... with length OK for this time, but maybe insufficient for another select.

SYSPRINT has a pagewidth ( recsize ) of 133.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Feb 22, 2008 3:40 am    Post subject:
Reply with quote

Quote:
Can we bring this to in single line?


I though my answer was clear : no or change the program or use SPUFI with an appropriate output.
Back to top
View user's profile Send private message
natinuk

New User


Joined: 23 Nov 2006
Posts: 22
Location: India

PostPosted: Fri Feb 22, 2008 3:41 am    Post subject:
Reply with quote

Thanks!

PeD wrote:
Quote:
Can we bring this to in single line?


I though my answer was clear : no or change the program or use SPUFI with an appropriate output.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Fri Feb 22, 2008 3:43 am    Post subject:
Reply with quote

Just a question : do you have a need to rework the output ? or is it only a question of readability?

You also can write "quickly" a rexx DB2 program to have what you want to.
Back to top
View user's profile Send private message
natinuk

New User


Joined: 23 Nov 2006
Posts: 22
Location: India

PostPosted: Fri Feb 22, 2008 4:13 am    Post subject:
Reply with quote

I am actually doing this manually and preparing the report.
If you have any sample REXX program, that will help me a lot.

Thanks a lot for your help!


PeD wrote:
Just a question : do you have a need to rework the output ? or is it only a question of readability?

You also can write "quickly" a rexx DB2 program to have what you want to.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 1 Wed Jul 26, 2017 7:35 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us