Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

JCL & VSAM :: RE: ERROR WHILE SUBMITTING LOAD JOB

$
0
0
Author: Akatsukami
Posted: Sun Aug 28, 2016 1:15 am (GMT 5.5)

Again, Anuradha-chan, we need to see the JCL and control cards used, and the actual messages received.
_________________
Data is not information.
Information is not knowledge.
Knowledge is not wisdom.


COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: sergeyken
Posted: Sun Aug 28, 2016 8:10 am (GMT 5.5)

I guess it makes no sense to convert this to neither COBOL nor anything else.

Since you have your selection list in the file, and finally you need to use SORT facility based on this selection, the better way is to do it straightforward:
Code:

//SORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SELECT DD *
ADAM
BASU
DAVE
JOHN
MARY
NICK
RAJA
SARA
//INPUT DD DSN=input file
//SORTOUT DD DSN=output file
//SYSIN DD *
 JOINKEYS F1=SELECT,
          FIELDS=(1,4,A)
 JOINKEYS F2=INPUT,
          FIELDS=(1,4,A)
 REFORMAT FIELDS=(F2:1,length)
 SORT FIELDS=(1,4,CH,A)
 SUM FIELDS=NONE
 END
//*

_________________
Tyrannosaurus-REXX

COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: pramitdas
Subject: Reply to: how to DYNAMICALLY write sort cond to o/p file using cobol
Posted: Sun Aug 28, 2016 10:29 am (GMT 5.5)

It is all based on the requirements as agreed.

It apparently needs a Cobol program due to the below reason.

A dynamic JCL should be populated which can be submitted automatically by CLIST from the same job. Means SAY job A has two steps. First step to prepare the desired output thru Cobol program and 2nd step to submit the output ( in this case SORT JCL ) JCL thru some CLIST. Means, if I have submitted JCL A, it will submit JCL B as well. I believe that is the requirement.

Thanks!!

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: mistah kurtz
Posted: Sun Aug 28, 2016 1:30 pm (GMT 5.5)

Quote:
Can you please help with this? A sort step or anything?

Did you try anything?

COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: Nic Clouston
Posted: Sun Aug 28, 2016 3:52 pm (GMT 5.5)

Quote:
I believe that is the requirement

No - that is not the requirement. The requirement is to format the data. The most efficient mens of doing that should be chosen.

Other points:
1 - the cobol program could directly submit the next job
2 - using CLIST is outmoded - using Rexx is the better option
3 - use code tags when presenting JCL, control cards, data and anything else that you see on your screen - as shown you have control cards starting in column 1 which is WRONG
4 - INCLUDE is a sort control card not a JCL card so should not have // in columns 1 and 2:
//STEPNAME --------------
//INCLUDE COND=(1,4,EQ,C'XXX1,YYY2,ZZZ1',
OR,1,4,EQ,C'XXX2,YYY2,ZZZ2',
OR,1,4,EQ,C'XXX3,YYY3'),FORMAT=SS
SORT FIELDS=(1,4,CH,A)
SUM FIELDS=NONE
/*
should be
Code:
//STEPNAME -----------
 INCLUDE COND=(1,4,EQ,C'XXX1,YYY2,ZZZ1',
 OR,1,4,EQ,C'XXX2,YYY2,ZZZ2',
 OR,1,4,EQ,C'XXX3,YYY3'),FORMAT=SS
 SORT FIELDS=(1,4,CH,A)
 SUM FIELDS=NONE
/*

_________________
Regards
Nic

JCL & VSAM :: RE: ERROR WHILE SUBMITTING LOAD JOB

$
0
0
Author: Nic Clouston
Posted: Sun Aug 28, 2016 4:03 pm (GMT 5.5)

There can be differences between online and batch authorities. Check with your security group.
_________________
Regards
Nic

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: Nic Clouston
Posted: Sun Aug 28, 2016 4:06 pm (GMT 5.5)

Please use the code tags when presenting JCL, data, program code, control cards or anything else that you would see on your terminal.

Also, you do not have any files - you have data sets.
_________________
Regards
Nic

COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: sergeyken
Posted: Sun Aug 28, 2016 7:37 pm (GMT 5.5)

Note 1
SORT statement semantics is wrong for SS (SubString) format/function. The syntax is correct, but it doesn't work as expected by author.
The correct statement would be either (using SS,EQ):
Code:
 INCLUDE COND=(C'XXX1,YYY2,ZZZ1',EQ,1,4,
       OR,C'XXX2,YYY2,ZZZ2',EQ,1,4,
       OR,C'XXX3,YYY3',EQ,1,4),FORMAT=SS

or (using CH,EQ):
Code:
INCLUDE COND=(1,4,EQ,L(C'XXX1',C'YYY2',C'ZZZ1'),
      OR,1,4,EQ,L(C'XXX2',C'YYY2',C'ZZZ2'),
      OR,1,4,EQ,L(C'XXX3',C'YYY3')),FORMAT=CH

Note 2
String manipulation in COBOL is possible, but extremly inconvenient. The easier way is using REXX or some other tools.
REXX option:
Code:
. . .
"execio * diskr SELECTDD (stem ListSel. finis" /* read into stem variable */

Step = 3
Do i = 1 by Step to ListSel.0
   StrWords = ''
   Do j = i to (i + Step - 1)
      StrWords = StrWords || ListSel.j
      If j >= ListSel.0 Then Leave j
      StrWords = StrWords || ','
   End j

   If i = 1 Then
      StrStmt = " INCLUDE COND=(C'"
   Else
      StrStmt = "       OR,C'"

   StrStmt = StrStmt || StrWords

   If (i + Step - 1) < ListSel.0 Then
      StrStmt = StrStmt || "',"
   Else
      StrStmt = StrStmt || "'),FORMAT=SS"

   Queue StrStmt
End i

"execio * diskw OUTDD (finis"  /* write all lines from program stack */
     

_________________
Tyrannosaurus-REXX


JCL & VSAM :: IEF645I INVALID REFERBACK IN THE RC FIELD

$
0
0
Author: abdulrafi
Subject: IEF645I INVALID REFERBACK IN THE RC FIELD
Posted: Mon Aug 29, 2016 10:57 am (GMT 5.5)

Hi,

I am getting the following error while executing my JCL,

10 IEF645I INVALID REFERBACK IN THE RC FIELD

jcl:
==
Code:
//T040D5ZX JOB (P904030,T040,99,99),'VIC7IX-TEST1',               
//  NOTIFY=&SYSUID,MSGCLASS=Q,TIME=(02,00),REGION=0M               
//VIC7IX6A EXEC FAMVS,REGION=6M                                   
//SYSPRINT DD SYSOUT=*                                             
//SYSLIST  DD SYSOUT=*                                             
//DD01     DD DISP=SHR,DSN=NVSTN.VIC7IX.THROWIN.DATA.G5           
//SYSIN    DD DISP=SHR,DSN=T040D5Z.PDS.CNTLCARD(VIC7IX6A)         
/*                                                                 
//IF3A     IF (VIC7IX6A.RC = 0) THEN                               
//VIC7IX6B EXEC XMITIP                                             
//*                                                               
//SYSTSIN  DD DISP=SHR,DSN=T040D5Z.PDS.CNTLCARD(VIC7IX6B)         
//*                                                               
//VIC7IX6C EXEC PGM=CAN444                                         
//ENDIF3A  ENDIF                                                   



jesjcl:
====
Code:
 1 //T040D5ZX JOB (P904020,T040,99,99),'VIC7IX-TEST1',                   
   //  NOTIFY=&SYSUID,MSGCLASS=Q,TIME=(02,00),REGION=0M                 
   IEFC653I SUBSTITUTION JCL - (P904020,T040,99,99),'VIC7IX-TEST1',NOTIFY
   REGION=0M                                                             
 2 //VIC7IX6A EXEC FAMVS,REGION=6M                                       
 3 XXFAPROC   PROC ENTRY=FILEAID                                         
 4 XXFAMVS    EXEC PGM=&ENTRY,REGION=4M                                 
   IEFC653I SUBSTITUTION JCL - PGM=FILEAID,REGION=4M                     
 5 XXSTEPLIB   DD DSN=COMPWARE.FAMVS.LOAD,DISP=SHR                       
 6 //SYSPRINT DD SYSOUT=*                                               
   X/SYSPRINT  DD SYSOUT=*                                               
 7 //SYSLIST  DD SYSOUT=*                                               
   X/SYSLIST   DD SYSOUT=*                                               
 8 //DD01     DD DISP=SHR,DSN=NVSTN.VIC7IX.THROWIN.DATA.G5               
   /*                                                                   
 9 //SYSIN    DD DISP=SHR,DSN=T040D5Z.PDS.CNTLCARD(VIC7IX6A)             
10 //IF3A     IF (VIC7IX6A.RC > 0) THEN                                 
11 //VIC7IX6B EXEC XMITIP                                               
 12 XXXMITIP   PROC                                             
    XX*================================================         
    XX*= XMITIP V564                                  =         
    XX*=                                              =         
    XX*= XMITIP IS SHAREWARE PROVIDED BY THE VEHICLES =         
    XX*= APPLICATION GROUP.                           =         
    XX*=                                              =         
    XX*= IT ALLOWS A BATCH JOB TO SEND AN EMAIL WITH  =         
    XX*= ATTACHMENT IN ONE STEP..                     =         
    XX*================================================         
 13 XXTRANSMIT EXEC PGM=IKJEFT01,                               
    XX         REGION=0M,                                       
    XX         DYNAMNBR=100                                     
 14 XXSTEPLIB  DD DSN=ATSPN.SHR.XMITIP.LOAD,                   
    XX            DISP=SHR                                     
 15 XXSYSEXEC  DD DSN=ATSPN.SHR.XMITIP.EXEC,                   
    XX            DISP=SHR                                     
 16 XXSYSPRINT DD SYSOUT=*                                     
 17 XXSYSTSPRT DD SYSOUT=*                                     
   18 XXSYSTERM  DD SYSOUT=*                                     
   19 XXSYSIN    DD TERM=TS                                     
      //*                                                       
   20 //SYSTSIN  DD DISP=SHR,DSN=T040D5Z.PDS.CNTLCARD(VIC7IX6B) 
      //*                                                       
   21 //VIC7IX6C EXEC PGM=CAN444                                 
   22 //ENDIF3A  ENDIF                                           



The jcl works when I replaced IF (VIC7IX6A.RC = 0) with IF (RC = 0) after looking at the solution of already posts.

But in my production already I have scenarios to check IF (VIC7IX6A.RC = 0) using the step condition. But here when I test its not working.

Can you please me to resolve it ?. I need to use with step name.
_________________
Thanks,
Abdul Rafi

JCL & VSAM :: RE: IEF645I INVALID REFERBACK IN THE RC FIELD

$
0
0
Author: Akatsukami
Posted: Mon Aug 29, 2016 11:32 am (GMT 5.5)

Step VIC7IX6A is executing a JCL procedure, which has steps of its own. The procstepname, FAMVS, must be used to qualify VIC7IX6A on the IF statement.
_________________
Data is not information.
Information is not knowledge.
Knowledge is not wisdom.

JCL & VSAM :: RE: IEF645I INVALID REFERBACK IN THE RC FIELD

$
0
0
Author: abdulrafi
Posted: Mon Aug 29, 2016 11:45 am (GMT 5.5)

Oh yes. I got it. Thanks for your help. :-). Its working fine now.
_________________
Thanks,
Abdul Rafi

COBOL Programming :: Random Password (in string format) generation.

$
0
0
Author: ezhavendhan
Subject: Random Password (in string format) generation.
Posted: Mon Aug 29, 2016 3:18 pm (GMT 5.5)

Hello All,

I have got a requirement to "Generate Random Password using COBOL". Below are the conditions to be satisfied for generating the password.

a) A random password should be geneated everytime when the module is called and should be not be the same of any of previous calls.

b) The Password should be in combination of Alphanumeric( Both upper case and Lower case ) and symbols ( National characters).

c) Password length should be 10.

When researched online I could find that there's only Random generation for numeric formats.

It would be highly appreciated if someone enlighten for the possibilities in Alphanumeric formats.

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: Bill Woodger
Subject: Reply to: Random Password (in string format) generation.
Posted: Mon Aug 29, 2016 4:11 pm (GMT 5.5)

Forget about a). With a minimum of 52-to-the-power-of-10 possibilities for the password, you'd be extremely unlikely (one in 10-to-the-17+ for a single number) to get a repeat on a random generation, and you'd need about 10-to-the-10+ passwords generated before you get to a one-in-a-million chance of a repeat.

Count your allowable characters. Generate 10 random numbers within that range. Use a table to access the stored characters, once for each character of the password.

Confirm whether the random number should be "seeded" or not. Your Audit/Security people will know, if no-one else.

COBOL Programming :: RE: Random Password (in string format) generation.

$
0
0
Author: Robert Sample
Posted: Mon Aug 29, 2016 6:28 pm (GMT 5.5)

1. You need to understand "random" -- your point (a) completely contradicts the idea of randomness.

2. Computers do not generate mathematically random numbers -- what you get is a sequence of pseudorandom numbers. For IBM's Enterprise COBOL, from any given starting seed, you get over 2 billion values before they start repeating.

3. Read carefully the description of function RANDOM in the Enterprise COBOL Language Reference manual - it tells you several important things to know (such as the returned value is in the range of zero to one so you will have to scale it, and that you need to provide an initial seed value followed by no arguments; if you don't provide a seed the sequence will ALWAYS be the same).

4. How far back does the "requirement" for uniqueness go? If you are saying that there can never be a duplicate, then you might as well give up now as a pseudorandom sequence will repeat, sooner or later -- period. If not, you need to be clear about how many unique values are required before a duplicate could occur (a duplicate may not occur for a long time, but you still need to know how many unique values are required).

Oh, and terminology is critical in IT where similar terms may mean very different things. COBOL does not have "strings" as used in other languages -- that is, variables whose length varies at run time. COBOL allows, in very limited cases, variable length variables but unlike a Java string these variables are NOT required to be terminated with a \0 (or LOW-VALUE in COBOL terms).
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: RahulG31
Subject: Reply to: Add system date inside of a PS file at particular column
Posted: Mon Aug 29, 2016 8:04 pm (GMT 5.5)

Quote:
Please note that I need a simple step to achieve. COBOL/SAS/EZ will not be an option as agreed with Client.

So, you don't know how simple or difficult it could be. You don't know how to do it and it seems that you don't even want to try. But then, you go ahead and make false promises to your Client. Not good.

.


COBOL Programming :: RE: how to DYNAMICALLY write sort cond to o/p file using cobol

$
0
0
Author: Rohit Umarjikar
Posted: Mon Aug 29, 2016 8:38 pm (GMT 5.5)

Code:
INCLUDE COND=(1,4,EQ,C'ADAM,BASU,DAVE',
 OR,1,4,EQ,C'JOHN,MARY,NICK',
 OR,1,4,EQ,C'RAJA,SARA'),FORMAT=SS
 SORT FIELDS=(1,4,CH,A)
 SUM FIELDS=NONE
Why even bother formulating such control cards or file? Join this file with the final file where you want to use this card?
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: magesh23586
Subject: Reply to: Add system date inside of a PS file at particular column
Posted: Mon Aug 29, 2016 9:23 pm (GMT 5.5)

incase first header is unique and always will have "DETAILS" in 1,7 position, use the below code.

Code:

//STEP0200 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SYMNOUT  DD SYSOUT=*                                           
//SYMNAMES DD *                                                 
HDATE,S'&LYR2.&LMON.&DAY'                                       
//SORTIN   DD DSN=UR INPUT FB/80                                                                                 
//SORTOUT  DD DSN=UR OUPUT FB/80                                           
//SYSIN    DD *                                                 
  OPTION COPY,STOPAFT=2                                         
  INREC IFTHEN=(WHEN=(1,7,CH,EQ,C'DETAILS'),OVERLAY=(60:HDATE)) 
//*                                                             


Incase header in not unique use below code, assuming LRECL=80
Code:

//STEP0200 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SYMNOUT  DD SYSOUT=*                                     
//SYMNAMES DD *                                           
HDATE,S'&LYR2.&LMON.&DAY'                               
//SORTIN   DD DSN=UR INPUT FB/80                                                                                 
//SORTOUT  DD DSN=UR OUPUT FB/80                                   
//SYSIN    DD *                                           
  OPTION COPY,STOPAFT=2                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),       
        IFTHEN=(WHEN=(81,8,ZD,EQ,1),OVERLAY=(60:HDATE)),   
        IFOUTLEN=80                                       

_________________
Regards,
Magesh

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: Rohit Umarjikar
Posted: Mon Aug 29, 2016 9:36 pm (GMT 5.5)

Welcome!
You will need to do a research and try something yourself as told by RahulG31 and then someone can help further if you get into any problems.
Try this.
Code:
SORT FIELDS=COPY                                           
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),         
      IFTHEN=(WHEN=(81,8,ZD,EQ,+1),OVERLAY=(60:DATE1))     
OUTFIL INCLUDE=(81,8,ZD,EQ,+1,OR,81,8,ZD,EQ,+2),BUILD=(1,80)

_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif

DFSORT/ICETOOL :: RE: Icetool or Joinkeys example to compare two files

$
0
0
Author: Rohit Umarjikar
Posted: Mon Aug 29, 2016 9:57 pm (GMT 5.5)

Thanks Magesh for the correction of the offset per REFORMAT.
Thanks Bill and I agree to the point of using SYNAMES as noted before.
No Doubt SYSNAMES is optimal to work but also if TS confirms 'the last byte of file1 is ALWAYS a space' then we can get ride of two subtasks as then we can join on last byte of each file.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."icon_razz.gif

DFSORT/ICETOOL :: RE: Add system date inside of a PS file at particular column

$
0
0
Author: Nic Clouston
Posted: Mon Aug 29, 2016 11:23 pm (GMT 5.5)

Locked as posted and answered on Kolusu's forum.
_________________
Regards
Nic

Viewing all 8500 articles
Browse latest View live