IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Running query in batch mode and formatting


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chavansu

New User


Joined: 20 Nov 2008
Posts: 14
Location: California USA

PostPosted: Thu Nov 20, 2008 4:59 am
Reply with quote

Hi,
I am running a spufi in batch mode and creating a flat file as an output.
Following is my query

Code:
UNLOAD TABLESPACE DB2 FORCE     
LOCK NO QUIESCE YES QUIESCECAT NO
SELECT   EMP_ID,
              EMP_Dept_No
FROM   EMP-TABLE         
      WITH UR;                     
      OUTDDN (SYSREC00)             
      LOADDDN SYSPUNCH             
      FORMAT USER (                 
      COL 1 NULLID NO TYPE CHAR(9),
      COL 2 NULLID NO TYPE CHAR(9),   

First two fields in the table are defined as S9(9) usage comp. In the ouput file I am getting leading spaces. I want leading zeroes instead.

Can you please guide me?

Thanks


Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Nov 20, 2008 9:04 am
Reply with quote

chavansu,

Which utility/program are you executing? Please post a few actual and expected output records.
Back to top
View user's profile Send private message
chavansu

New User


Joined: 20 Nov 2008
Posts: 14
Location: California USA

PostPosted: Thu Nov 20, 2008 11:15 pm
Reply with quote

here i the code

Code:
//STEP010 EXEC PGM=INZUTILB
//        REGION=0M,TIME=1439,COND=(4,LT)             
//*                                                   
//STEPLIB  DD  DSN=SPP.DB2TOOL.LOAD,                 
//             DISP=SHR                               
//         DD  DSN=SYS1.DB2.LOAD,                     
//             DISP=SHR                               
//*                                                   
//SYSIN    DD  DSN=spufi to be run,       
//             DISP=SHR                               
//*                                                   
//SYSREC   DD  DSN=output file
//             DISP=(NEW,CATLG,DELETE),               
//             SPACE=(CYL,(10,10),RLSE),               
//             DCB=(BLKSIZE=0,LRECL=80,RECFM=FB)       
//*                                                   
//SYSOUT   DD  SYSOUT=P                         
//SYSPRINT DD  SYSOUT=P                           
//SYSDUMP  DD  SYSOUT=H                           
//SYSPUNCH DD  SYSOUT=P     
SPUFI i have already given in my query.
current output is
(blank)(blank)1234567(blank)(blank)1234567

desired ouput is
001234567001234567

Anuj I am sorry but I dont know how to use BB code
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 21, 2008 3:53 am
Reply with quote

Hello,

Quote:
Anuj I am sorry but I dont know how to use BB code
At the top of the Reply panel are the "tags". Near the middle is the "Code" tag.

To use the Code tag, you can copy/paste your source, highlight the source, and click "Code". To see what your post will look like to the forum, click Preview. When you are satisfied with the appearance of your post, click Submit. In addition to readability, Code preserves alignment so you do not need to try to "space" things out to line up. Code also works well for jcl, utility control statements, and data.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts HILITE on Browse mode? TSO/ISPF 2
No new posts Running REXX through JOB CLIST & REXX 13
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top