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
 
Need help to populate date in COMP-3 format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need help to populate date in COMP-3 format
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: 8400
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 21, 2016 4:03 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2031
Location: NY,USA

PostPosted: Tue Jun 21, 2016 6:32 pm    Post subject:
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    Post subject:
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    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 Comp interview questions Deepak1518780 Mainframe Interview Questions 5 Sat Sep 22, 2018 7:26 pm
No new posts Replace comp-3 field value to comp-3 ... dharmaraok DFSORT/ICETOOL 5 Fri Sep 14, 2018 3:46 pm
No new posts How can we create a flat file in JAVA... jasorn Java & MQSeries 2 Wed Aug 08, 2018 3:08 pm
This topic is locked: you cannot edit posts or make replies. Add 5 days to a date Ron Klop DB2 19 Wed Jul 25, 2018 8:11 pm
No new posts Comparing Comp-3 fields with greater ... Prateeksichem1 DFSORT/ICETOOL 11 Fri Jul 13, 2018 8:45 am

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