View previous topic :: View next topic
|
Author |
Message |
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
Hello
I have this output file: (FB/240)
Code: |
0LEN=0163 TOD=090619 DATE=07/01/04 ID=13 NAME=MWE
bLEN=0171 TOD=073000 DATE=07/01/05 ID=13 NAME=MWE
|
Now I want to reformat this file that only contains this information:
Code: |
FROM DATE=07/01/04 TOD=090619
TO DATE=07/01/05 TOD=073000
|
Could anyone help me please.
Roland |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Great, that makes it easy....
So all the data for an output line in on the input line?
If so, sort or copy and reformat during either the input or output phase.
Output to file or print (with or without headings and page breaks).
Do you have a sort manual? |
|
Back to top |
|
|
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
I looked at a SORT manuel with your information of sort or copy and
reformat
In the attachment is my JCL
Thanks Bill
May be it is a way to format this records easier, but I'm happy to create
this JCL.
Roland |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Does that mean it worked for you? |
|
Back to top |
|
|
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
Yes it works fine.
Thanks
Roland |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Roland,
Here's a DFSORT job that will do what you asked for in your first post:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/240)
//SORTOUT DD DSN=... output file (FB/240)
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=240,
IFTHEN=(WHEN=INIT,
BUILD=(C'FROM ',24,15,12,10,241:SEQNUM,1,ZD)),
IFTHEN=(WHEN=(241,1,ZD,EQ,+2),
OVERLAY=(1:C'TO '))
/*
|
|
|
Back to top |
|
|
|