View previous topic :: View next topic
|
Author |
Message |
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
Dear Listers,
My input dataset is :
Code: |
EDIT PUBLIC.ARGN.COUNT
Command ===>
****** ***************************** Top of Data *
000001 ABCDE 9999992010-03-11
000002 FGHIJ 333332010-03-11
000003 KLMNO 77777772010-03-11
000004 PQRST 44442010-03-11
****** **************************** Bottom of Data
|
I want the output to be the following where the dataset node ARGN is appended to the end of the record. Is this even possible via SYNCSORT
or in any other way?
Code: |
EDIT PUBLIC.ARGN.COUNT.EDT
Command ===>
****** ***************************** Top of Data *
000001 ABCDE 9999992010-03-11ARGN
000002 FGHIJ 333332010-03-11ARGN
000003 KLMNO 77777772010-03-11ARGN
000004 PQRST 44442010-03-11ARGN
****** **************************** Bottom of Data
|
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Using the SYMNAMES DD statement would probably do the trick. |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
superk wrote: |
Using the SYMNAMES DD statement would probably do the trick. |
We use SYNCSORT at our shop. Does SYMNAMES work with SYNCSORT?
I have limited experience in JCL being a DB2 DBA. Would appreciate if any code sample/example is provided for me to work upon. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
will the string always be ARGN, if so an overlay will do the trick
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABCDE 9999992010-03-11
FGHIJ 333332010-03-11
KLMNO 77777772010-03-11
PQRST 44442010-03-11
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(26:C'ARGN')
|
Gerry |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
gcicchet wrote: |
Hi,
will the string always be ARGN, if so an overlay will do the trick
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABCDE 9999992010-03-11
FGHIJ 333332010-03-11
KLMNO 77777772010-03-11
PQRST 44442010-03-11
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(26:C'ARGN')
|
Gerry |
Hi Gerry,
Unfortunately not! The string will change based on region. ARGN is A region. BRGN will be for B region and so on... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
So where in the data do you determine what string to use ?
Gerry |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
if you use smf id or something like that, you you could generate the control cards using Rexx and calling MVSVAR function to get the name. call rexx under TSO (IKJEFT01), use EXECIO to write to a preallocated ddname and use a referback in the SORT step. (there are other ways, of course). |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Raymond Sachs wrote: |
Unfortunately not! The string will change based on region. ARGN is A region. BRGN will be for B region and so on... |
Then you should show us rather comprehensive information including the input/output and all the rules you want to apply to get the expected output... |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
gcicchet wrote: |
So where in the data do you determine what string to use ?
Gerry |
The string that goes into the OUTREC will come from a dataset node of the input file. I have nine datasets which are identical except for the fourth node which will have values "ARGN", "BRGN", "CRGN", "DRGN".. "IRGN".
Hope this helps. |
|
Back to top |
|
|
Raymond Sachs
New User
Joined: 13 Dec 2007 Posts: 45 Location: USA
|
|
|
|
MBabu wrote: |
if you use smf id or something like that, you you could generate the control cards using Rexx and calling MVSVAR function to get the name. call rexx under TSO (IKJEFT01), use EXECIO to write to a preallocated ddname and use a referback in the SORT step. (there are other ways, of course). |
I would definitely like to know how you would do this. Do you have code sample for me to look into? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Here's what I usually use to get system info
Code: |
SAY 'SYSTEM ID = ' MVSVAR(SYSNAME)
SAY 'DFP LEVEL = ' MVSVAR(SYSDFP)
SAY 'OP SYSLEVEL = ' MVSVAR(SYSMVS)
SAY 'JES2 INFO = ' SYSVAR(SYSJES)
SAY 'JES2 NODE = ' SYSVAR(SYSNODE)
SAY 'USER ID = ' SYSVAR(SYSUID)
SAY 'USER PREFIX = ' SYSVAR(SYSPREF)
SAY 'LOGON PROC = ' SYSVAR(SYSPROC)
SAY 'HSM LEVEL = ' SYSVAR(SYSHSM) |
|
|
Back to top |
|
|
|