Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort card required to change the date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort card required to change the date
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: 1439
Location: Bangalore,India

PostPosted: Wed Nov 07, 2007 3:42 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Nov 07, 2007 4:07 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Nov 07, 2007 10:03 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us