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

Error while using symbols


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

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Tue Oct 07, 2008 3:54 am
Reply with quote

Hi,

I am trying to extract all records from a file where a date field is less than current date - 90 days.

The following sort card works fine.
SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(105,8,CH,LT,DATE1-90)

When i am trying to use the number of days through a symbol file, i am getting a syntax error.

SORT FIELDS=COPY
OUTFIL FILES=01,INCLUDE=(105,8,CH,LT,DATE1-CUTOFF)

The symnames dataset has:
CUTOFF,90

Can symbols be used with DATE1 calculations?

Thanks,
Aneesh.
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: Tue Oct 07, 2008 4:38 am
Reply with quote

No, for DATE1-d, you cannot use a symbol for d.

However, if you use a symbol with +d like this:

CUTOFF,+90

you can use a DFSORT job like the following to do what you want:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD *
CUTOFF,+90
/*
//SORTIN DD *
DUMMY
/*
//SORTOUT DD DSN=&&C1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL BUILD=(C'  SORT FIELDS=COPY',80:X,/,
    C'  OUTFIL FILES=01,INCLUDE=(105,8,CH,LT,DATE1-',
    CUTOFF,TO=ZD,LENGTH=3,C')')
/*
//S2  EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOF01 DD DSN=...  output file
//SYSIN  DD DSN=&&C1,DISP=(OLD,PASS)
Back to top
View user's profile Send private message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Tue Oct 07, 2008 5:39 am
Reply with quote

Thanks a lot, Frank.
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
Search our Forums:

Back to Top