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
 

 

Error while using symbols

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Error while using symbols
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 Moderator


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

PostPosted: Tue Oct 07, 2008 4:38 am    Post subject:
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    Post subject: Reply to: Error while using symbols
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    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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am


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