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
 
trailer record with date fields-getting error.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 7:05 pm    Post subject: trailer record with date fields-getting error.
Reply with quote

Hi..

I want to insert only one row in a file having below details

Filename , current date,record count,currentdate-1 day

and other requirement (another new control card)

Filename , current date,record count,currentdate-1 month

lrecl = 71
ex..

test.file.name ,20070322, 9045,20070321

i used the below card but getting syntax error ..




Code:
 SORT FIELDS=(1,2,CH,A)                                           
 OUTFIL TRAILER1=('TEST.FILE.NAME',45:',',                       
 DATE=(4MD),',',COUNT=(M12,LENGTH=8),',',DATE=(4MD)-1),NODETAIL 
                                        $
SYNTAX ERROR                                                     
C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000                 
END OF DFSORT                                         




thanks,
Deepa
Back to top
View user's profile Send private message

Deepa.m
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 8:04 pm    Post subject:
Reply with quote

just came to know that we can't use date manipulation in trailer and header.

any other way to achieve this?
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: Thu Mar 22, 2007 8:51 pm    Post subject:
Reply with quote

You can create a symbol for the current date - 1 day and then use that symbol in your TRAILER1 operand, e.g.

Code:

//S1  EXEC PGM=ICEMAN                                           
//SYSOUT DD SYSOUT=*                                             
//SORTIN   DD *                                                 
RECORD                                                           
//SORTOUT DD SYSOUT=*                                           
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS) 
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INREC BUILD=(C'DTM1,''',DATE1-1,C'''',80:X)                   
/*
//S2  EXEC PGM=ICEMAN
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
...
   OUTFIL TRAILER1=(...,DTM1,...)
/*
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 query to fetch record which has only ... maxsubrat DB2 4 Mon Dec 11, 2017 5:03 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 1 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm

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