Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us