View previous topic :: View next topic
|
Author |
Message |
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Hi,
I need the sort card for doing the below.
Change the return date to 30-12-2000 in a file FILEA for all records with department = 1220 and consignments from 25005 TO 38771.
Assume the record positions as follows:
Total record length =80
Consignments (keyfield) : 1-5 (5 length)
Dept : 10-13 (4 length)
Date : 15-22 (8 length)
Thanks in advance,
Prabhu |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Prabhu,
Quote: |
Date : 15-22 (8 length) |
Quote: |
Change the return date to 30-12-2000 in |
Are you missing anything? Date fields length is 8 but the provided date value is 10 in length. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
murmohk1 wrote: |
Are you missing anything? Date fields length is 8 but the provided date value is 10 in length. |
Get real, the dashes were provided for clarity...... |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
hi ,
Date field is :30122000
length of 8 only
Thanks,
Prabhu |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Prabhu,
You can use a DFSORT job like the following to do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
25004 1220 01012000
25005 1220 01012000
25005 1219 01012000
25006 1220 01012000
38770 1220 01012000
38771 1220 01012000
38772 1220 01012000
38770 1219 01012000
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(10,4,ZD,EQ,+1220,AND,
1,5,ZD,GE,+25005,AND,1,5,ZD,LE,38771),
OVERLAY=(15:C'30122000'))
/*
|
SORTOUT would have:
Code: |
25004 1220 01012000
25005 1220 30122000
25005 1219 01012000
25006 1220 30122000
38770 1220 30122000
38771 1220 30122000
38772 1220 01012000
38770 1219 01012000
|
|
|
Back to top |
|
|
|