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
 

 

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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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