Using System symbols in SORT



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Using System symbols in SORT

Postby mfrookie » Fri Jun 08, 2012 6:46 pm

I have been trying to use system symbols in a SORT job, but unfortunately haven't been successful completely.

Some of the systm symbols I tried like &SYSPLEX, &SYSNAME, &LHHMMSS work perfectly. But when I try &SYSUID, I don't see SYSUID being replaced by the actual user id. Instead I see a string in output
as '&SYSUID'.

I am trying to generate a JOB and want the person's user id to be used in the jobname along with 2 byte constant.

Here is the job that I have been using.
//REARRJCL EXEC PGM=SORT,COND=(0,NE)
//SORTIN   DD   *
1
/*
//SYMNAMES DD   *
WK-SYSUID,S'&SYSUID'
WK-SYSPLEX,S'&SYSPLEX'
WK-LHHMMSS,S'&LHHMMSS'
/*
//SORTOUT  DD   SYSOUT=*
//SYSIN    DD   *
  INREC FIELDS=(C'WK-SYSUID : ',WK-SYSUID,
                C' WK-SYSPLEX : ',WK-SYSPLEX,
                C' WK-LHHMMSS : ',WK-LHHMMSS)
  SORT FIELDS=COPY
/*
//SYMNOUT  DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*


And here is the output I see.
WK-SYSUID : &SYSUID WK-SYSPLEX : UKMC1 WK-LHHMMSS : 205609


Can someone please help, is there anything wrong I am doing.

Thanks.
mfrookie
 
Posts: 40
Joined: Mon Apr 25, 2011 8:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using System symbols in SORT

 

Re: Using System symbols in SORT

Postby Akatsukami » Fri Jun 08, 2012 6:56 pm

Symbolics cannot be used in control cards; you need to devise another way of generating your SYMNAMES data.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Using System symbols in SORT

Postby mfrookie » Fri Jun 08, 2012 7:07 pm

Akatsukami wrote:Symbolics cannot be used in control cards; you need to devise another way of generating your SYMNAMES data.


Hi,

I didn't get what you are trying to say. If you see the SYSPLEX and LHHMMSS values are properly getting resolved but SYSUID is not getting resolved.
mfrookie
 
Posts: 40
Joined: Mon Apr 25, 2011 8:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using System symbols in SORT

Postby MrSpock » Fri Jun 08, 2012 7:40 pm

&SYSUID is not a system symbolic. These are:

http://publibz.boulder.ibm.com/cgi-bin/ ... E241/2.2.2
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Using System symbols in SORT

Postby mfrookie » Fri Jun 08, 2012 7:57 pm

MrSpock wrote:&SYSUID is not a system symbolic. These are:

http://publibz.boulder.ibm.com/cgi-bin/ ... E241/2.2.2



Hello Mr. Spock,

I did check those symbols, but I was under impression that even the ones mentioned in following link are part of system symbols. It seems I am wrong. Because I tried &SID which is not part of static or dynamic symbols list and it didn't work.

http://publibz.boulder.ibm.com/cgi-bin/ ... 1025161613
mfrookie
 
Posts: 40
Joined: Mon Apr 25, 2011 8:46 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Using System symbols in SORT

Postby Robert Sample » Fri Jun 08, 2012 8:29 pm

The manual you quoted specifically says the symbols, which include &SID and &SYSUID cannot be specified in the system symbol table because they are reserved by the operating system. That does not mean those values are system symbols -- it means they cannot be specified as system symbols.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: Using System symbols in SORT

Postby NicC » Fri Jun 08, 2012 8:30 pm

There are other ways of getting these symbols into your control cards but you need to pass them as parameters to a program (a short Rexx program will do) which will generate the data for your //SYMNAMES DD statement. Examples appear in various parts of the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Using System symbols in SORT

Postby mfrookie » Mon Jun 11, 2012 4:39 pm

Thanks to everyone for the clarifications.

I will look for another way to get them in my SORT JOB.

Thanks.
mfrookie
 
Posts: 40
Joined: Mon Apr 25, 2011 8:46 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post