IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort card required to change the date


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ESSPRABHU

New User


Joined: 11 Oct 2005
Posts: 22

PostPosted: Wed Nov 07, 2007 3:33 pm
Reply with quote

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

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Nov 07, 2007 3:42 pm
Reply with quote

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

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Nov 07, 2007 4:07 pm
Reply with quote

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

New User


Joined: 11 Oct 2005
Posts: 22

PostPosted: Wed Nov 07, 2007 4:55 pm
Reply with quote

hi ,

Date field is :30122000
length of 8 only

Thanks,
Prabhu
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 07, 2007 10:03 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top