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

Need to reduce the size for selected records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Karthikeyan Subbarayan

New User


Joined: 24 Feb 2008
Posts: 62
Location: Boston

PostPosted: Wed Feb 24, 2010 6:05 pm
Reply with quote

My input file have different table values and my tabels are ZBCRI,EDADB,ZBCRW,ZAOXP in which the table ZBCRI one of the cloumn datatype has been reduced from CHAR(5) to CHAR(2) and the remaining table row's should be same in the output file. Can some one help me on this.

My input file looks
Code:

ZBCRI                   UF00   AANB13 YY N200911012009073020091101
EDADB                                        PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00   AANB13 YY N        20090730         
EDADB                          1315970454    PA                   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00   AA**13 YY N200911012009073020091101
EDADB                          1316012474001 PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00   **NB13 YY N200911012009073020091101
EDADB                          1316012515    PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             


i want to have the output file in this format
Code:

ZBCRI                   UF00AANB13 YY N200911012009073020091101
EDADB                                        PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00AANB13 YY N        20090730         
EDADB                          1315970454    PA                   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00AA**13 YY N200911012009073020091101
EDADB                          1316012474001 PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
ZBCRI                   UF00**NB13 YY N200911012009073020091101
EDADB                          1316012515    PA2009110120100501   
ZBCRW                                                                 
ZAOXP               03403426 200612112007011120070111Y             
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Feb 24, 2010 10:59 pm
Reply with quote

Karthikeyan Subbarayan,

You haven't mentioned the LRECL/RECFM of the input files. I assumed that your input is FB recfm and 80 bytes LRECL. The column that needs to be truncated is at pos 27 thru 31.

Code:

//STEP0100 EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
ZBCRI                   UF00   AANB13 YY N200911012009073020091101     
EDADB                                        PA2009110120100501         
ZBCRW                                                                   
ZAOXP               03403426 200612112007011120070111Y                 
ZBCRI                   UF00   AANB13 YY N        20090730             
EDADB                          1315970454    PA                         
ZBCRW                                                                   
ZAOXP               03403426 200612112007011120070111Y                 
ZBCRI                   UF00   AA**13 YY N200911012009073020091101     
EDADB                          1316012474001 PA2009110120100501         
ZBCRW                                                                   
ZAOXP               03403426 200612112007011120070111Y                 
ZBCRI                   UF00   **NB13 YY N200911012009073020091101     
EDADB                          1316012515    PA2009110120100501         
ZBCRW                                                                   
ZAOXP               03403426 200612112007011120070111Y                 
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  SORT FIELDS=COPY                                                     
  INREC IFTHEN=(WHEN=(1,5,CH,EQ,C'ZBCRI'),BUILD=(1,28,32,49,3X))       
//*
Back to top
View user's profile Send private message
Karthikeyan Subbarayan

New User


Joined: 24 Feb 2008
Posts: 62
Location: Boston

PostPosted: Wed Feb 24, 2010 11:57 pm
Reply with quote

hi Skolusu,

my record format is VB and record length as 2000 and also in the example i show only few records but orginally the input file has bulk of records . So for SORTIN shall i use the input file name and also i need the out put file with the specified format
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Feb 25, 2010 12:18 am
Reply with quote

Karthikeyan Subbarayan,

No. You cannot use the same control cards. You need to use different control cards.

What is the position and format of the table identifier (ZCBRI)? consider the RDW (4 bytes) when specifying the position.

What is the position and format of the field that needs to be truncated? consider the RDW (4 bytes) when specifying the position.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts Using Java/C/C++ to retrieve dataset ... Java & MQSeries 6
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top