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 OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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