|
View previous topic :: View next topic
|
| Author |
Message |
Rick Ryan
New User
Joined: 29 Apr 2020 Posts: 14 Location: USA
|
|
|
|
Hello! I am creating a Report. Here is what I have for my Header:
| Code: |
OUTFIL HEADER1=(1:'BACKORDERED PARTS WITH NO SDI',
42:&TIME=(12:),81:'1',
* ' ',53:WEEKDAY=(CHAR9),',',' ',&DATE=(M=(CHAR9),D,4)),
3/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:'------------------',25:'----------',38:'------',
48:'-----',/), |
Here is what my output needs to look like:
| Code: |
********************************* Top of Data **********************************
1BACKORDERED PARTS WITH NO SDI 11:05 Friday, May 15, 2020
|
How can I format the system date like this? I cannot find anything specific on how to code the parameters for &DATE. Thanks! |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The same people who respond on this board also respond on the other board, so posting here will not get you better answers than you've already gotten. The lack of responses so far may indicate that nobody knows how to do what you want, or that what you want cannot be done, or nobody with the appropriate knowledge has read your posts.
Furthermore, since Syncsort is an independent software vendor product, you are VASTLY more likely to get what you want by contacting Syncsort support and working with them. Vendors know their products, generally, much better than people responding on a forum. And if your site has a license for Syncsort then you are entitled to get support from them. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
Input:
| Code: |
OPTION COPY
OUTREC IFTHEN=(WHEN=INIT,
OVERLAY=(81:TIME2(:),X,112:DATE1,120:112,8,Y4T,WEEKDAY=DIGIT1,
87:117,1,CHANGE=(10,C'1',C'Sunday,',
C'2',C'Monday,',
C'3',C'Tuesday,',
C'4',C'Wednesday,',
C'5',C'Thursday,',
C'6',C'Friday,',
C'7',C'Saturday,'),
98:116,2,CHANGE=(9,C'01',C'January',
C'02',C'February',
C'03',C'March',
C'04',C'April',
C'05',C'May',
C'06',C'June',
C'07',C'July',
C'08',C'August',
C'09',C'September',
C'10',C'October',
C'11',C'November',
C'12',C'December'),
108:118,2,C',',X)),
IFTHEN=(WHEN=INIT,BUILD=(1,80,81:81,35,SQZ=(SHIFT=RIGHT,MID=C' ')))
OUTFIL FNAMES=(SORTOUT),
HEADER1=(1:'BACKORDERED PARTS WITH NO SDI',
46:81,35,
3/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:'------------------',25:'----------',38:'------',
48:'-----',/),
BUILD=(1,80)
END |
Output (Browse Mode):
| Code: |
********************************* TOP OF DATA **********************************
BACKORDERED PARTS WITH NO SDI 18:27 Thursday, May 26, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ ---------- ------ -----
DUMMY
******************************** BOTTOM OF DATA ******************************** |
|
|
| Back to top |
|
 |
Rick Ryan
New User
Joined: 29 Apr 2020 Posts: 14 Location: USA
|
|
|
|
| THANK YOU SO MUCH!!!!!! IT works perfectly! I THOUGHT I posted this on the SYNCSORT Forum. My apologies!! |
|
| Back to top |
|
 |
Rick Ryan
New User
Joined: 29 Apr 2020 Posts: 14 Location: USA
|
|
|
|
| I was trying to figure this out but I am having no luck. Why is it showing today's date as THURSDAY? Where in DATE1 is there a day of the week position? I keep looking at this and DATE1 should be YYYYMMDD. Am I missing something? |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
I just noticed that I have applied a wrong offset for the day of week.
Change:
| Code: |
| 87:117,1,CHANGE=(10,C'1',C'Sunday,', |
to:
| Code: |
| 87:120,1,CHANGE=(10,C'1',C'Sunday,', |
Output:
| Code: |
BACKORDERED PARTS WITH NO SDI 03:21 Wednesday, May 27, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ ---------- ------ -----
DUMMY |
|
|
| Back to top |
|
 |
Rick Ryan
New User
Joined: 29 Apr 2020 Posts: 14 Location: USA
|
|
|
|
| Thank you! |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2286 Location: USA
|
|
|
|
| Joerg.Findeisen wrote: |
I just noticed that I have applied a wrong offset for the day of week. |
Unnoticed problem: the date is being fully re-calculated for EACH record of the report, plus INSERTED only when header line position is reached. In case of HEADER1 - it is used once per report...
But, who cares nowadays?..... |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| sergeyken wrote: |
| Unnoticed problem: the date is being fully re-calculated for EACH record of the report, plus INSERTED only when header line position is reached. In case of HEADER1 - it is used once per report... |
I can rest you assured that I was aware of that situation. |
|
| Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1442 Location: Bamberg, Germany
|
|
|
|
| Code: |
//DATETIME EXEC PGM=SORT,PARM='MSG=NO'
//SORTIN DD *
DUMMY
/*
//SYSOUT DD SYSOUT=*
//SORTOUT DD DISP=(NEW,PASS),UNIT=SYSALLDA,
// SPACE=(TRK,(1)),
// DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0
//SYSIN DD *
OPTION COPY,STOPAFT=1
INREC IFOUTLEN=80,IFTHEN=(WHEN=INIT,
OVERLAY=(TIME2(:),81:DATE1,81,8,Y4T,WEEKDAY=DIGIT1,
7:89,1,CHANGE=(10,C'1',C'Sunday,',
C'2',C'Monday,',
C'3',C'Tuesday,',
C'4',C'Wednesday,',
C'5',C'Thursday,',
C'6',C'Friday,',
C'7',C'Saturday,'),
18:85,2,CHANGE=(9,C'01',C'January',
C'02',C'February',
C'03',C'March',
C'04',C'April',
C'05',C'May',
C'06',C'June',
C'07',C'July',
C'08',C'August',
C'09',C'September',
C'10',C'October',
C'11',C'November',
C'12',C'December'),
28:87,2,C',',X,81,4)),
IFTHEN=(WHEN=INIT,
BUILD=(C'DateTime,''',1,35,SQZ=(SHIFT=RIGHT,MID=C' '),C''''))
END
/*
//SORTDATS EXEC PGM=SORT,PARM='MSG=NO'
//SYMNAMES DD DISP=(OLD,PASS),DSN=*.DATETIME.SORTOUT
//SYMNOUT DD SYSOUT=*
//SORTIN DD *
Data
Data
Data
/*
//SYSOUT DD SYSOUT=*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=(SORTOUT),
HEADER1=(1:'BACKORDERED PARTS WITH NO SDI',46:DateTime,
3/38:'EMER',/,
5:'PART NUMBER',25:'B/O DATE',38:'ORDERS',48:'LINES',/,
2:18C'-',25:10C'-',38:6C'-',48:5C'-',/),
BUILD=(1,80)
END
/* |
Makes use of SYMBOLS and calculates the requested Date/Time only once.
| Code: |
********************************* TOP OF DATA **********************************
BACKORDERED PARTS WITH NO SDI 21:01 Wednesday, May 27, 2020
EMER
PART NUMBER B/O DATE ORDERS LINES
------------------ ---------- ------ -----
Data
Data
Data
******************************** BOTTOM OF DATA ******************************** |
|
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|