IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help to populate date in COMP-3 format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chetanambi

New User


Joined: 21 Jan 2012
Posts: 58
Location: India

PostPosted: Tue Jun 21, 2016 12:25 pm
Reply with quote

Hi

I am trying to create a file with values pre-populated as below.
But for the position 147 which is comp-3 field (length=5) I am not able to populate date in the format YYYYMMDD in comp-3 format. Tried looking at manuals but could not find it. Can you please help or give me pointer.

Here is the code I am using.

Code:


//STEP10   EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DUMMY,RECFM=FB,                                         
//             LRECL=2040,BLKSIZE=18360                               
//SORTOUT  DD DSN=<<file name>>,DISP=(NEW,CATLG,DELETE),         
//             DATACLAS=DSIZC50                                       
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 OUTFIL REMOVECC,HEADER1=(10:C'0',19:C'P',24:C'1',81:X'0000000C',     
              85:X'000000000C',90:X'0000000C',94:X'00000001',         
              98:X'0000000C',102:X'000000000C',107:X'0000000C',       
              111:X'00000001',147:DATENS=(4MD),                       
              177:X'00000000',669:C'0120')                             

Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 21, 2016 4:03 pm
Reply with quote

The first issue is that COMP-3 is a COBOL term.

Try looking in your manuals for packed decimal instead.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Tue Jun 21, 2016 6:32 pm
Reply with quote

DATE1P
Back to top
View user's profile Send private message
chetanambi

New User


Joined: 21 Jan 2012
Posts: 58
Location: India

PostPosted: Mon Jul 04, 2016 10:31 am
Reply with quote

Thank you. I was able to resolve this using DATE1P as suggested by Rohit
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top