Display Integer Fields along with Date using OUTFIL



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Display Integer Fields along with Date using OUTFIL

Postby Manjucan » Fri May 24, 2019 5:20 pm

I have an input file of record length 410 and each file record contains 4 fields - first 2 fields are of type INT(4),third field is of DATE type and fourth field is of type CHAR of length 45.

The first 2 fields are not displayed as they are integers.The requirement is to convert the fields to displayable format and copy the entire record to another file with the fields delimited by comma.

Is it possible to achieve this using OUTFIL BUILD option?
Manjucan
 
Posts: 9
Joined: Thu Feb 07, 2019 10:09 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display Integer Fields along with Date using OUTFIL

Postby NicC » Fri May 24, 2019 5:48 pm

What have you tried?
What was the result?
How did the result differ from what you requred?
Where does your source data come from (DATE is not a valid PL/I or COBOL data type)?
An integer is just a whole number so how come you cannot display it?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Display Integer Fields along with Date using OUTFIL

Postby Manjucan » Sat May 25, 2019 10:36 pm

The source data comes from DB2 table and written to a PS file. In the first 2 fields (declared as INT(4) in the DB2 table )are not displayed as such in the file whereas the DATE field is displayed properly. I read in the manuals that the integer fields need to be modified using OUTFIL to display correctly. I tried the below SORT card logic to modify the fields and write to another dataset.

BUILD=(1,4,BI,EDIT=(IIIIIIIIT),C',',11,4,BI,EDIT=(IIIIIIIIT),C',',21,10,C',',32,45,410:X


In the output file the first field is displayed correctly but the second field is displayed as some other number whereas the date is not displayed.

I doubt the issue is with the BUILD option I am using.
Manjucan
 
Posts: 9
Joined: Thu Feb 07, 2019 10:09 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post