Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Is there a way to get the node of a dataset in the OUTREC?
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

Moderator Team Head


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

PostPosted: Fri Mar 12, 2010 7:35 am    Post subject: Reply to: Is there a way to get the node of a dataset in the
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    Post subject: Re: Reply to: Is there a way to get the node of a dataset in
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: 1703
Location: Australia

PostPosted: Fri Mar 12, 2010 7:52 am    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Mar 12, 2010 8:06 am    Post subject:
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: 401
Location: Mumbai

PostPosted: Fri Mar 12, 2010 10:48 am    Post subject:
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

Senior Member


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

PostPosted: Fri Mar 12, 2010 12:41 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Mar 13, 2010 2:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us