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

SYNCTOOL: No abend but data format is not correct


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Wed Apr 04, 2007 6:29 pm
Reply with quote

Code:

//*
//ICETOOL1 EXEC PGM=SYNCTOOL
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=&TRS.SEQ.AU.MASTER.VEND,DISP=SHR
//IN2 DD DSN=&TRS.SEQ.AU.AU2100.OUTREC.SORT,DISP=SHR
//OUT DD DSN=&TRS.SEQ.TEST1.AU2100.BASE,
// DISP=(,CATLG,DELETE),
// SPACE=(CYL,(50,50),RLSE)
//T1 DD DSN=&TRS.SEQ.TEST1.AU2100.TEMP01,
// DISP=(MOD,CATLG,DELETE),
// SPACE=(CYL,(50,50),RLSE)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,6,CH) WITH(32,166) WITHALL
/*
//CTL1CNTL DD *
OUTREC FIELDS=(1,31,32:166X)
/*
//CTL2CNTL DD *
OUTREC FIELDS=(1,166,167:1,31)
/*
//*


Output is coming without any abend, data format is not correct. Please let me know where it is wrong.

Output data is as follows:

1-31 bytes - 2nd file data
32-166 bytes - first file data
1-31 - first file data displaying at the end means after 167th byte

I need the output as follows:

Second file has to display with 31 bytes, then first file should be concatenated and should be displayed from 32nd position till 197 position
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 04, 2007 6:33 pm
Reply with quote

Girija

This looks amazingly similar to the problem we solved yesterday. What are you doing that is different ?
Back to top
View user's profile Send private message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Wed Apr 04, 2007 6:54 pm
Reply with quote

I am not denying that...

But the output should be as follows:

second file having LRECL = 31
First File having LRECL = 166

What happening in the output is as follows:

Output LRECL = 200
Second file data is displaying for the first 31 bytes - that is fine with me
First File data having 166 bytes of data. In that, first 31 bytes displaying at the end of the output file(from 167 to 197th position) but it is supposed to display from 32nd position in the output file, hence i am not getting the format I required.
Remaining data should display after this.

Only Problem I am facing first file data that to 31 bytes, it was supposed to display from 32 position , displaying from 167 position.
I know I made some mistakes in declaring OUTREC fields, but I am not getting what is the mistake i have done.


Sortparm are as follows:

TSPDS.SORTPARM(TPSORT06) -
***************************
OUTREC FIELDS=(1,31,32:166X)
**************************

TSPDS.SORTPARM(TPSORT07) - 01.

****************************
OUTREC FIELDS=(1,166,167:1,31)
****************************

TSPDS.SORTPARM(TPSORT08)
----------------------------------------
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,6,CH) WITH(32,166) WITHALL

Please let me know any mistakes, done while defining OUTREC fields?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 04, 2007 7:07 pm
Reply with quote

This is how we redefined the shorter records yesterday, and your code does not look like what is coded here.
Quote:

I think it may have to do with the 115 byte record. It looks as though your OUTREC may be incorrect.

The code below is coded from memory so may need a little tweak, but this is how I see it-
1,115 = original 115 byte record
385X = 385 spaces to build up to 500 bytes
1,115 = append original record after spaces

OUTREC=(1,115,385X,1,115)
Back to top
View user's profile Send private message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Thu Apr 05, 2007 11:13 am
Reply with quote

ya, this is a different case.

First File contains lesser record length compared to second file. I come to know if the second file is having shorter records.

In this scenario,
First File having LRECL-31
Second File LRECL-166

Earlier we discussed with
First File LRECL- 500
Second File LRECL-115

If second file having more LRECL, then how to defined OUTREC in TPSORT07

Currently i have defined as follows:
TSPDS.SORTPARM(TPSORT07)
****************************
OUTREC FIELDS=(1,166,167:1,31)
****************************

By giving this , data formatting not displaying properly.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 05, 2007 12:18 pm
Reply with quote

Take avery close look at what we did on Tuesday.

With the shorter record we added the correct number of blanks to make the record length the same as the longer record, and then what did we do with the original shorter record ?

And for the longer record what did we do, we did not take the first 31 bytes of this record and stick it on the end .................... did we ? SO what did we put on the end of this record ?
Back to top
View user's profile Send private message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Thu Apr 05, 2007 1:03 pm
Reply with quote

IF the first file is longer than second file, then we can adjust the second file, hence data format would be fine.

But now in the second scenario, first file having lesser compared to first one. Hence not getting the format I required.

If I match second file length by comparing first file, here it won't work and even I can't give Banks here as you know second file containing full 166 bytes of data, but some how not getting the format I REquired.

Output file conatining 200 Bytes....
in the out file - getting data format as below:

1-31, 31 bytes from second file
32-166, first file data starting from 32nd byte
167-197, first file data starting from 1st byte

What I need is ...

1-31, 31 bytes from second file
32-197, first file data starting from 1st byte


Now i think My question is clear to everybody....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 05, 2007 1:25 pm
Reply with quote

The problem as far as I can see is exactly the same as the one that was resolved on Tuesday, just with different record lengths.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 05, 2007 1:45 pm
Reply with quote

FILE2 - Increase from 31 to 31 + 166 BLANKS.

FILE1 - Pos 1-6, the key, leave as is, BLANKS in pos 7 - 31, pos 32 = 166 bytes of original FILE1 record.

Not sure if the order of the records in T1 can affect the result, but I would try by swapping the order in which the records are written to T1, doing the shorter ones first. May not affect it, let me know what happens.
Back to top
View user's profile Send private message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Thu Apr 05, 2007 2:37 pm
Reply with quote

If I specify outrec fields mentioned as above, getting data format issue,
please can you let me know what I need to specify.
Back to top
View user's profile Send private message
Girija

New User


Joined: 29 Jul 2005
Posts: 14
Location: Mysore

PostPosted: Thu Apr 05, 2007 3:49 pm
Reply with quote

Hi,

I tried as per the positions mentioned below:

FILE2 - Increase from 31 to 31 + 166 BLANKS.

FILE1 - Pos 1-6, the key, leave as is, BLANKS in pos 7 - 31, pos 32 = 166 bytes of original FILE1 record.

------------------

FILE2 - Increase from 31 to 31 + 166 BLANKS. - this is fine

FILE1 - Contains all 166 bytes of original FILE1 record, hence i speicify Blanks from 7-31, then in the output it displays Blanks and loosing 25 bytes of data
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 05, 2007 4:23 pm
Reply with quote

I was saying that you move the 166 byte record along to position 32 so that it gets spliced with the 31 bytes of the file2 record.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top