IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there a way to get the node of a dataset in the OUTREC?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Fri Mar 12, 2010 6:51 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 12, 2010 7:35 am
Reply with quote

Using the SYMNAMES DD statement would probably do the trick.
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Fri Mar 12, 2010 7:44 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Mar 12, 2010 7:52 am
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Fri Mar 12, 2010 8:00 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Mar 12, 2010 8:06 am
Reply with quote

So where in the data do you determine what string to use ?


Gerry
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Fri Mar 12, 2010 10:48 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 12, 2010 12:41 pm
Reply with quote

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...icon_smile.gif
Back to top
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Sat Mar 13, 2010 8:59 am
Reply with quote

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
View user's profile Send private message
Raymond Sachs

New User


Joined: 13 Dec 2007
Posts: 45
Location: USA

PostPosted: Sat Mar 13, 2010 9:01 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Mar 13, 2010 2:16 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top