MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deleting part of a record

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Thu Feb 10, 2005 9:51 am    Post subject: Deleting part of a record Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Thu Feb 10, 2005 10:15 am    Post subject: Reply with quote

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
Code:

((8


on the last line type

Code:

((


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
View user's profile Send private message Send e-mail Visit poster's website
nadh
Intermediate


Joined: 08 Oct 2004
Posts: 192
Topics: 89

PostPosted: Thu Feb 10, 2005 10:53 am    Post subject: Reply with quote

tHANK YOU VERY MUCH KOLUSU

REGARDS
NADH
Back to top
View user's profile Send private message Send e-mail
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Apr 14, 2006 1:51 am    Post subject: Does this work for Syncsort? Reply with quote

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
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Apr 14, 2006 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Apr 14, 2006 2:03 am    Post subject: Reply with quote

Corrected SYSIN card for File-Aid JCL is -->

Code:

//SYSIN    DD  *                             
$$DD01 COPY MOVE=(1,0,9)
//*


Now it matches with the SORT solution............ Wink

Thanks.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group