-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of 
ITURIEL DO NASCIMENTO NETO
Sent: Thursday, March 20, 2008 2:18 PM
To: [email protected]
Subject: How to Split a Record ? (DFSORT ?)

<snip>

Once i have a dataset (80 positions), is there an easy way to split the
records, specifying the initial column  ?
Like this :
+---5---10----5---20
AAAAAAAAAAAABBBBBBBB
AAAAAAAAAAAABBBBBBBB
AAAAAAAAAAAABBBBBBBB

Generating (Split in column 13)
+---5---10----5---20
AAAAAAAAAAAA
BBBBBBBB
AAAAAAAAAAAA
BBBBBBBB
AAAAAAAAAAAA
BBBBBBBB

<snip>

You can use a sort.

//SORT    EXEC PGM=SORT
//SORTIN  DD   DSN=input.data.set.name,DISP=SHR
//SORTOUT DD   DSN=output.data.set.name,DISP=SHR
//SYSIN   DD   *
  SORT FIELDS=COPY           
  OUTFIL  OUTREC=(1,12,/,13,8)
//SYSOUT  DD   SYSOUT=*



John Reda
Syncsort, Inc. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to