MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
nadh Intermediate Joined: 08 Oct 2004 Posts: 192 Topics: 89
Posted: Thu Feb 10, 2005 9:51 am Post subject: Deleting part of a record
I have a ps file. I want a new copy of it excluding first 8chars.
eg
ta02604a0101111.......
in this i want new file to be created excluding ta02604a.
anyone..pls. help me out...
thanks in advance
nadh.
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Thu Feb 10, 2005 10:15 am Post subject:
Nadh,
If the file is relatively small , then you can use TSO edit COMMANDS to remove the first 8 bytes.
on the first line type this
on the last line type
or you can run a simple JCL using sort/fileaid to copy the contents from pos 9
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT FILE,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(9,N-8) $ HERE n IS THE TOTAL LRECL OF THE FILE
//*
Code:
//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=YOUR INPUT FILE,
// DISP=SHR
//DD01O DD DSN=YOUR OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
$$DD01 COPY MOVE=(1,0,8)
//*
Hope this helps...
Cheers
kolusu _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu
Back to top
nadh Intermediate Joined: 08 Oct 2004 Posts: 192 Topics: 89
Posted: Thu Feb 10, 2005 10:53 am Post subject:
tHANK YOU VERY MUCH KOLUSU
REGARDS
NADH
Back to top
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Fri Apr 14, 2006 1:51 am Post subject: Does this work for Syncsort?
Kolusu,
I tried the following SORT JCL but ended up in error.
Code:
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT FILE,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(9,N-8) $ HERE n IS THE TOTAL LRECL OF THE FILE
//*
The SYSOUT shown the following:
Code:
SYNCSORT FOR Z/OS 1.2.0.0R
SYSIN :
SORT FIELDS=COPY
OUTREC FIELDS=(9,22-8)
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Any help? _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Fri Apr 14, 2006 1:55 am Post subject:
Kolusu, I am sorry. I misunderstood the N-8.
I corrected it as shown below and it went fine.
Code:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(9,14)
//*
This is nice way of copying selective stuff.
Thanks a lot. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
ranga_subham Intermediate Joined: 31 Jan 2006 Posts: 255 Topics: 72
Posted: Fri Apr 14, 2006 2:03 am Post subject:
Corrected SYSIN card for File-Aid JCL is -->
Code:
//SYSIN DD *
$$DD01 COPY MOVE=(1,0,9)
//*
Now it matches with the SORT solution............
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum