Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
PUSH OUTSTR not moving data correct correctly in output PDS.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
kabyab

New User


Joined: 31 Aug 2005
Posts: 34
Location: Pune, India

PostPosted: Mon May 25, 2009 7:19 pm    Post subject: PUSH OUTSTR not moving data correct correctly in output PDS.
Reply with quote

I am trying to write a REXX script where in it will take in input from a sequential file MMBRLSTIN, do some processing and the output will be written in a PDS CTCOUT within a member.

The values passed in each variable are as follows:
MMBRLSTIN = 'ABC.DEF.XYZ' -- sequential file
CTCOUTPDS = 'LMN.PQR.HIJ' -- PDS
CTCOUT = CTCOUTPDS||'('||MEMBER||')'

I am not getting the output as desired. The output I am getting and the desired output is mentioned below. Also provided is the code for your reference.


Code:
                       
/*  READ INPUT MEMBER LIST INTO AN ARRAY */                             
"EXECIO * DISKR INPUTDD (FINIS STEM IN."                                                     
RETCODE = SYSDSN("'"CTCOUTPDS"'")                                   
SAY "RETURNCODE FOR OUTPUT CTC DATASET= "RETCODE                     
IF RETCODE = "DATASET NOT FOUND" THEN DO                             
      SAY "ALLOCATING NEW OUTPUT DATASET "CTCOUTPDS                     
     "ALLOC F(OUTDD) DS('"CTCOUTPDS"') NEW CATALOG SPACE(100 50) TRACK",
      "DIR(10) DSORG(PO) RECFM(F,B) LRECL(80) BLKSIZE(27920)",         
      "RETPD(60)"                                                       
END                                                                 
SAY "COPYING RESULTS IN MEMBER "PROCESS,                             
       "IN DATASET " CTCOUTPDS                                         
"ALLOC F(OUTDD) DS('"CTCOUT"') SHR REU"                                                                       
/* WRITE CTC */                                                         
COUNTMEM = IN.0                                                       
SAY "TOTAL MEMBERS = "COUNTMEM                                       
I = 0
OUTSTR = '  SIGNON USERID=(&SYSUID) '                     
PUSH OUTSTR                                               
"EXECIO 1 DISKW OUTDD (STEM OUT."                         
 
OUTSTR = ' SIGNOFF                                       '           
PUSH OUTSTR                                                           
"EXECIO 1 DISKW OUTDD (STEM OUT."                                     
                                                                       
"EXECIO 0 DISKW OUTDD (FINIS STEM OUT."                               
"FREE FI(OUTDD)"                                                     
RETURN 0;                                                             


I am getting output as follows
Code:

******************** Top of Data ***********
OUT.1                                                                         
OUT.1                                                                         
*************** Bottom of Data **************


I want output as below
Code:

**************** Top of Data *****************
 SIGNON USERID=(&SYSUID)                   
 SIGNOFF                                       
**************** Bottom of Data****************


I think I am missing out something in the DISKR and DISKW steps but I amnot able to locate it properly. Any help would be much appreciated. Thanks in Advance. Please let me know in case any further details are required.
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: Mon May 25, 2009 7:25 pm    Post subject:
Reply with quote

Try changing this
Code:

  OUTSTR = '  SIGNON USERID=(&SYSUID) '                     
  PUSH OUTSTR                                               
  "EXECIO 1 DISKW OUTDD (STEM OUT."                         

to this
Code:

  OUTSTR = '  SIGNON USERID=(&SYSUID) '                     
  PUSH OUTSTR                                               
  "EXECIO 1 DISKW OUTDD"                         

And the same for the other line you wish to write
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us