 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Restore Job Schedule entry to iSeries box.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 03:14:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: slack400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-89344</link>
		<dc:creator>slack400</dc:creator>
		<pubDate>Sun, 13 Mar 2011 08:53:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-89344</guid>
		<description><![CDATA[Here&#039;s a similar issue:
&lt;a href=&quot;http://itknowledgeexchange.techtarget.com/itanswers/transfering-saverestore-job-scheduler-from-one-as400-to-another/&quot;&gt;http://itknowledgeexchange.techtarget.com/itanswers/transfering-saverestore-job-scheduler-from-one-as400-to-another/&lt;/a&gt;

I included the code I use to transfer over the Advanced Job Scheduler.]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s a similar issue:<br />
<a href="http://itknowledgeexchange.techtarget.com/itanswers/transfering-saverestore-job-scheduler-from-one-as400-to-another/">http://itknowledgeexchange.techtarget.com/itanswers/transfering-saverestore-job-scheduler-from-one-as400-to-another/</a></p>
<p>I included the code I use to transfer over the Advanced Job Scheduler.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-84801</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 03 Dec 2010 09:31:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-84801</guid>
		<description><![CDATA[Oh, and I just noticed that I left a bunch of old comments in the code. I cloned parts of a couple other programs to make the example. I was removing comments but I obviously got distracted and didn&#039;t finish cleaning it up.

The various &quot;list&quot; APIs all work almost the same way with user spaces. The user space APIs are almost the same in every program. So when you need a new program, you copy an old one and replace the &quot;list&quot; API. In this case, I replaced the &quot;list object locks&quot; API with the &quot;list job scheduler&quot; API.

Sometimes you don&#039;t replace the API. Instead, you change the format used by the API. This example asks for format ‘SCDL0100′. You might choose to change that to format ‘SCDL0200′. The API documentation tells you if one format gives everything you need.

BTW, if you copy/paste the code, paste it into something like Notepad first. This editor doesn&#039;t handle simple apostrophes. It changes them into leading/trailing single-quotes. You&#039;ll want to use Find/Replace in Notepad (or whatever you use) to change those all back to simple apostrophes.

Tom]]></description>
		<content:encoded><![CDATA[<p>Oh, and I just noticed that I left a bunch of old comments in the code. I cloned parts of a couple other programs to make the example. I was removing comments but I obviously got distracted and didn&#8217;t finish cleaning it up.</p>
<p>The various &#8220;list&#8221; APIs all work almost the same way with user spaces. The user space APIs are almost the same in every program. So when you need a new program, you copy an old one and replace the &#8220;list&#8221; API. In this case, I replaced the &#8220;list object locks&#8221; API with the &#8220;list job scheduler&#8221; API.</p>
<p>Sometimes you don&#8217;t replace the API. Instead, you change the format used by the API. This example asks for format ‘SCDL0100′. You might choose to change that to format ‘SCDL0200′. The API documentation tells you if one format gives everything you need.</p>
<p>BTW, if you copy/paste the code, paste it into something like Notepad first. This editor doesn&#8217;t handle simple apostrophes. It changes them into leading/trailing single-quotes. You&#8217;ll want to use Find/Replace in Notepad (or whatever you use) to change those all back to simple apostrophes.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-84800</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 03 Dec 2010 09:16:25 +0000</pubDate>
		<guid isPermaLink="false">#comment-84800</guid>
		<description><![CDATA[Here&#039;s a basic example of the QWCLSCDE API in a CL program followed by a real short description:&lt;pre&gt;
pgm     ( +
        )


   dcl    &amp;qtemp           *char      10     value( &#039;QTEMP&#039; )

   dcl    &amp;qusrspc         *char      20

   dcl    &amp;ErrCod          *char       4


   dcl    &amp;us_hdr          *char     150   /* Space header      */

/* This is a general-purpose field to hold objlck data...           */
   dcl    &amp;us_obje         *char     108   /* A single entry    */


/* General fields for RUSGENHDR...                                  */
   dcl    &amp;offslst         *int
   dcl    &amp;nbrlste         *int
   dcl    &amp;sizlste         *int

   dcl    &amp;us_name         *char      10     value( &#039;LSTSCDE&#039; )

   dcl    &amp;scd_Job         *char      10
   dcl    &amp;scd_Date        *char      10




   chgvar             &amp;qusrspc            ( &amp;us_name *cat &amp;qtemp )

   call    QUSCRTUS   ( +
                        &amp;qusrspc                +
                        &#039;TMPLST    &#039;            +
                        x&#039;00001000&#039;             +
                        X&#039;00&#039;                   +
                        &#039;*ALL      &#039;            +
                        &#039;Temp list scheduler    &#039; +
                        &#039;*YES      &#039;            +
                        x&#039;0000000000000000&#039;     +
                      )


   call    QWCLSCDE   ( +
                        &amp;qusrspc                +
                        &#039;SCDL0100&#039;              +
                        &#039;*ALL      &#039;            +
                        &#039;                &#039;      +
                        x&#039;0000000000000000&#039;     +
                      )

/*  Retrieve the initialization data...                             */

   call    QUSRTVUS   ( +
                        &amp;qusrspc                +
                        x&#039;00000001&#039;             +
                        x&#039;00000096&#039;             +
                        &amp;us_hdr                 +
                      )

   chgvar             &amp;offslst        %bin( &amp;us_hdr    125 4 )
   chgvar             &amp;nbrlste        %bin( &amp;us_hdr    133 4 )
   chgvar             &amp;sizlste        %bin( &amp;us_hdr    137 4 )


   if  ( &amp;nbrlste *eq 0 )     do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( &#039;No objects listed&#039; )
      goto   Clean_up
   enddo

/* Set the offset to the list within the space...            */

   chgvar             &amp;offslst            ( &amp;offslst + 1 )

/*------------------------------------------------------------------*/
/* Entries have been placed in the *usrspc for every objlck on the  */
/*  named lib. We can now loop through to see if any locks are      */
/*  held by another job...                                          */


/* Start retrieval of objlck entries from the *usrspc...            */

   dountil  ( &amp;nbrlste *le 0 )

      call    QUSRTVUS   ( +
                           &amp;qusrspc                +
                           &amp;offslst                +
                           &amp;sizlste                +
                           &amp;us_obje                +
                         )

   /* Extract job info from list entry...                       */

      chgvar          &amp;scd_Job        %sst( &amp;us_obje     2  10 )
      chgvar          &amp;scd_Date       %sst( &amp;us_obje    22  10 )

      sndpgmmsg   msgid( CPF9897 )       +
                    msgf( QSYS/QCPFMSG ) +
                    msgdta(              +
                            &#039;Processing&#039; *bcat +
                            &amp;scd_Job     *bcat +
                            &amp;scd_Date          +
                          )              +
                    topgmq( *ext ) +
                    msgtype( *diag )


/* Perform loop testing...                                   */

      chgvar          &amp;nbrlste            ( &amp;nbrlste - 1 )

      chgvar          &amp;offslst            ( &amp;offslst + &amp;sizlste )

   enddo


Clean_up:

   return

endpgm&lt;/pre&gt;
The program&lt;ol&gt;
	&lt;li&gt;Creates a user space,&lt;/li&gt;&lt;li&gt;List the job scheduler into the user space,&lt;/li&gt;&lt;li&gt;Retrieves list header info from the space to get the number of entries in the list, the size of each entry and the offset into the space for the start of the list. (The offset is zero-based, so we add (1) to it for CL processing.)&lt;/li&gt;&lt;li&gt;Then in a loop for each list element...&lt;/li&gt;&lt;li&gt;Retrieves individual job scheduler entry name and date,&lt;/li&gt;&lt;li&gt;And sends a message with name and date.&lt;/li&gt;
&lt;/ol&gt;
If you call the program from a QCMD command line, the messages will be detailed messages in the joblog.

About all the program really is is calling one API after the other. IBM API documentation explains each of the APIs, but if you have questions about any point, don&#039;t hesitate to ask.

The program only pulls two of the attributes out of each entry. You can pull all of the attributes for each entry and string them to gether to make a ADDJOBSCDE command. That can be sent to the remote system with SBMRMTCMD or RUNRMTCMD or written to file that you transfer to the other system.

Compile the example and run it. Learn what it does so you can use any of its pieces in other programs in the future. Start adding pieces to extract more attributes for the entries until you have all of the ones you need -- one attribute at a time until you feel comfortable.

Or look at how it works and convert it to RPG or your favorite language.

Tom]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s a basic example of the QWCLSCDE API in a CL program followed by a real short description:
<pre>
pgm     ( +
        )


   dcl    &amp;qtemp           *char      10     value( 'QTEMP' )

   dcl    &amp;qusrspc         *char      20

   dcl    &amp;ErrCod          *char       4


   dcl    &amp;us_hdr          *char     150   /* Space header      */

/* This is a general-purpose field to hold objlck data...           */
   dcl    &amp;us_obje         *char     108   /* A single entry    */


/* General fields for RUSGENHDR...                                  */
   dcl    &amp;offslst         *int
   dcl    &amp;nbrlste         *int
   dcl    &amp;sizlste         *int

   dcl    &amp;us_name         *char      10     value( 'LSTSCDE' )

   dcl    &amp;scd_Job         *char      10
   dcl    &amp;scd_Date        *char      10




   chgvar             &amp;qusrspc            ( &amp;us_name *cat &amp;qtemp )

   call    QUSCRTUS   ( +
                        &amp;qusrspc                +
                        'TMPLST    '            +
                        x'00001000'             +
                        X'00'                   +
                        '*ALL      '            +
                        'Temp list scheduler    ' +
                        '*YES      '            +
                        x'0000000000000000'     +
                      )


   call    QWCLSCDE   ( +
                        &amp;qusrspc                +
                        'SCDL0100'              +
                        '*ALL      '            +
                        '                '      +
                        x'0000000000000000'     +
                      )

/*  Retrieve the initialization data...                             */

   call    QUSRTVUS   ( +
                        &amp;qusrspc                +
                        x'00000001'             +
                        x'00000096'             +
                        &amp;us_hdr                 +
                      )

   chgvar             &amp;offslst        %bin( &amp;us_hdr    125 4 )
   chgvar             &amp;nbrlste        %bin( &amp;us_hdr    133 4 )
   chgvar             &amp;sizlste        %bin( &amp;us_hdr    137 4 )


   if  ( &amp;nbrlste *eq 0 )     do
      sndpgmmsg  msgid( CPF9898 ) msgf( QCPFMSG ) +
                   msgdta( 'No objects listed' )
      goto   Clean_up
   enddo

/* Set the offset to the list within the space...            */

   chgvar             &amp;offslst            ( &amp;offslst + 1 )

/*------------------------------------------------------------------*/
/* Entries have been placed in the *usrspc for every objlck on the  */
/*  named lib. We can now loop through to see if any locks are      */
/*  held by another job...                                          */


/* Start retrieval of objlck entries from the *usrspc...            */

   dountil  ( &amp;nbrlste *le 0 )

      call    QUSRTVUS   ( +
                           &amp;qusrspc                +
                           &amp;offslst                +
                           &amp;sizlste                +
                           &amp;us_obje                +
                         )

   /* Extract job info from list entry...                       */

      chgvar          &amp;scd_Job        %sst( &amp;us_obje     2  10 )
      chgvar          &amp;scd_Date       %sst( &amp;us_obje    22  10 )

      sndpgmmsg   msgid( CPF9897 )       +
                    msgf( QSYS/QCPFMSG ) +
                    msgdta(              +
                            'Processing' *bcat +
                            &amp;scd_Job     *bcat +
                            &amp;scd_Date          +
                          )              +
                    topgmq( *ext ) +
                    msgtype( *diag )


/* Perform loop testing...                                   */

      chgvar          &amp;nbrlste            ( &amp;nbrlste - 1 )

      chgvar          &amp;offslst            ( &amp;offslst + &amp;sizlste )

   enddo


Clean_up:

   return

endpgm</pre>
<p>The program
<ol>
<li>Creates a user space,</li>
<li>List the job scheduler into the user space,</li>
<li>Retrieves list header info from the space to get the number of entries in the list, the size of each entry and the offset into the space for the start of the list. (The offset is zero-based, so we add (1) to it for CL processing.)</li>
<li>Then in a loop for each list element&#8230;</li>
<li>Retrieves individual job scheduler entry name and date,</li>
<li>And sends a message with name and date.</li>
</ol>
<p>If you call the program from a QCMD command line, the messages will be detailed messages in the joblog.</p>
<p>About all the program really is is calling one API after the other. IBM API documentation explains each of the APIs, but if you have questions about any point, don&#8217;t hesitate to ask.</p>
<p>The program only pulls two of the attributes out of each entry. You can pull all of the attributes for each entry and string them to gether to make a ADDJOBSCDE command. That can be sent to the remote system with SBMRMTCMD or RUNRMTCMD or written to file that you transfer to the other system.</p>
<p>Compile the example and run it. Learn what it does so you can use any of its pieces in other programs in the future. Start adding pieces to extract more attributes for the entries until you have all of the ones you need &#8212; one attribute at a time until you feel comfortable.</p>
<p>Or look at how it works and convert it to RPG or your favorite language.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: woodengineer</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-84766</link>
		<dc:creator>woodengineer</dc:creator>
		<pubDate>Thu, 02 Dec 2010 17:30:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-84766</guid>
		<description><![CDATA[If there only a few job schedule entries it will be faster to re-enter instead of writing a program.  Working with APIs can be a bit challenging at first.

Check out the user written CPYJOBSCDE.  We have been using it for quite a while with good success.  I do not remember where we got it.  I think it was published in one of the AS/400 magazines.  It is also available from TAA tools.

This command will not copy a job schedule entry from one machine to another.  It is used to create a new job schedule entry based on one already on your computer.

I&#039;d be happy to send you the code if you like.  Its one command and one CLP.]]></description>
		<content:encoded><![CDATA[<p>If there only a few job schedule entries it will be faster to re-enter instead of writing a program.  Working with APIs can be a bit challenging at first.</p>
<p>Check out the user written CPYJOBSCDE.  We have been using it for quite a while with good success.  I do not remember where we got it.  I think it was published in one of the AS/400 magazines.  It is also available from TAA tools.</p>
<p>This command will not copy a job schedule entry from one machine to another.  It is used to create a new job schedule entry based on one already on your computer.</p>
<p>I&#8217;d be happy to send you the code if you like.  Its one command and one CLP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnsonmumbai</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-84729</link>
		<dc:creator>johnsonmumbai</dc:creator>
		<pubDate>Thu, 02 Dec 2010 10:03:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-84729</guid>
		<description><![CDATA[Iam new to API, how do we execute the QLCLSCDE API inorder to view the entries.

Johnson]]></description>
		<content:encoded><![CDATA[<p>Iam new to API, how do we execute the QLCLSCDE API inorder to view the entries.</p>
<p>Johnson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/restore-job-schedule-entry-to-iseries-box/#comment-84419</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 26 Nov 2010 10:46:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-84419</guid>
		<description><![CDATA[If you save/restore the scheduler object, it is object QDFTJOBSCD in library QUSRSYS, object type *JOBSCD.

Tom]]></description>
		<content:encoded><![CDATA[<p>If you save/restore the scheduler object, it is object QDFTJOBSCD in library QUSRSYS, object type *JOBSCD.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/8 queries in 0.039 seconds using memcached
Object Caching 339/340 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 17:07:12 -->