|
View previous topic :: View next topic
|
| Author |
Message |
Karthikeyan Subbarayan
New User

Joined: 24 Feb 2008 Posts: 62 Location: Boston
|
|
|
|
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 |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
 |
Karthikeyan Subbarayan
New User

Joined: 24 Feb 2008 Posts: 62 Location: Boston
|
|
|
|
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 |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
 |
|
|