View previous topic :: View next topic
|
Author |
Message |
harshal
New User
Joined: 29 Dec 2005 Posts: 21
|
|
|
|
I want to do the following.
I have multiple records in a VSAM file (will convert it to flat file before this processing) which contain a string RUSYSTM in the record, but the position where the RUSYSTM string lies withing the record is not fixed.
For record 1 it can be at position 100 and for record 2 say 160.
I want to search for this string in all record and want to write 500 bytes from the position where i found RUSYSTM string into a different file.
for record 1, it would be like write 500 bytes from position 100 and for record 2 it would be like write 500 bytes from position 160. Length of the records which are written to the output file are always same i.e 500.
I want to do this using SYNCSORT/SYNCTOOL. |
|
Back to top |
|
|
shankar.v
Active User
Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
|
|
|
|
harshal,
Please check with the following code for your requirement.
The below code works fine with SYNCSORT FOR Z/OS 1.3.0
Code: |
// EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INFILE,DISP=SHR
//SORTOUT DD DSN=OUTFILE,DISP=(,CATLG),RECFM=FB,LRECL=500,
// SPACE=(CYL,1)
//SYSIN DD *
OPTION COPY
INREC PARSE=(%00=(STARTAFT=C'RUSYSTM',FIXLEN=493)),
BUILD=(C'RUSYSTM',%00)
/*
// |
Thanks,
Shankar |
|
Back to top |
|
|
harshal
New User
Joined: 29 Dec 2005 Posts: 21
|
|
|
|
PARSE is coming to be UNIDENTIFIED parameter. Do i need to add some library or something for this.?? |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
harshalread this
Quote: |
code works fine with SYNCSORT FOR Z/OS 1.3.0 |
|
|
Back to top |
|
|
harshal
New User
Joined: 29 Dec 2005 Posts: 21
|
|
|
|
Can this be done without PARSE? with some other utility. My shop has license for Z/OS 1.2.3 and not for 1.3.0. Please help |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is there no chance to get your system upgraded to the current release?
You could always write a bit of code. . . |
|
Back to top |
|
|
harshal
New User
Joined: 29 Dec 2005 Posts: 21
|
|
|
|
No chance to upgrade the system. Can it be done thru SYNCTOOL? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe you would need to be at the 1.3 level.
Fortunately, it would be a small amount of work in cobol. . . |
|
Back to top |
|
|
|