Seperate line and merging
Posted: Tue May 21, 2013 5:57 pm
Hi all,
Thank you for having me here. I have been referring to this and its parent forum ibmmainframe.com for quite a while. It has gotten me through many of my MF queries.
This time around, my query is somewhat peculiar in nature. Please note that i can do this via COBOL but my intention is to do this via SORT.
INPUT FILE - (80 bytes/FB)
OUTPUT FILE - (80 bytes/FB)
All the lines in my output have to be hardcoded except this one '&NETFILE="POLCOUNT_<DATE>" where i want the '<DATE>' extracted from the input file and it has to be appended after the '_' sign. Can someone please assist me with this.
NOTE: the output files has some '-' signs which is required too and the first line in both files are column header for your reference. They are not required in the output file.
Regards
Varun
Thank you for having me here. I have been referring to this and its parent forum ibmmainframe.com for quite a while. It has gotten me through many of my MF queries.
This time around, my query is somewhat peculiar in nature. Please note that i can do this via COBOL but my intention is to do this via SORT.
INPUT FILE - (80 bytes/FB)
----+----1----+----2----+----3----+--
.³ XXX 20130520ABLO
.³ XXX 20130520ABLO
OUTPUT FILE - (80 bytes/FB)
----+----1----+----2----+----3----+----4----+----5----+----6---
SIGNON
SUBMIT PROC=MAPPLE -
NEWNAME=XABCD -
CASE=YES -
&MAINDSN='XXXX.TOTAL' -
&NETPATH='\\AB\\CD\ || -
\\\IT\\PROD\ || -
\\\POL\'\ -
&NETFILE="POLCOUNT_20130520" -
&EXT=".DAT"
SIGNOFF
SIGNON
SUBMIT PROC=MAPPLE -
NEWNAME=XABCD -
CASE=YES -
&MAINDSN='XXXX.TOTAL' -
&NETPATH='\\AB\\CD\ || -
\\\IT\\PROD\ || -
\\\POL\'\ -
&NETFILE="POLCOUNT_20130520" -
&EXT=".DAT"
SIGNOFF
All the lines in my output have to be hardcoded except this one '&NETFILE="POLCOUNT_<DATE>" where i want the '<DATE>' extracted from the input file and it has to be appended after the '_' sign. Can someone please assist me with this.
NOTE: the output files has some '-' signs which is required too and the first line in both files are column header for your reference. They are not required in the output file.
Regards
Varun