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
 

 

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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
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


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